[Java-gnome-developer] Re: java-gnome-developer digest, Vol 1 #166 - 3 msgs
Brought to you by:
afcowie
|
From: <bi...@ma...> - 2002-04-11 20:40:09
|
> Subject: [Java-gnome-developer] Scintilla (again?)
>=20
> Hello!
>=20
> I recently discovered this project and like it very much.
> Your brand new gtk2 bindings built well on my machine so there shouldn't
> be anything that stops me from playing around.
>=20
> Do you plan to support the Scintilla widget in the future?
> If so do you think it's possible to integrate it into your code
> generation or is this all manual work?
> IMHO a little editor would be a nice way for me to get started with
> java-gtk.
Here's a little editor using the gtk2 widget called GtkTextView.
(Jeff: maybe this could be used as an example in java-gnome, unless
you already something better showing textview?)
- S=F8ren
import gnu.gdk.*;
import gnu.gtk.*;
public class Editor {
public Editor() {
GtkWindow window =3D new GtkWindow(GtkWindowType.TOPLEVEL);
window.setTitle("Editor");
window.setDefaultSize(500, 380);
window.signalConnect("destroy", "mainQuit", Gtk.class);
String text =3D "This is a test";
GtkTextBuffer textBuffer =3D new GtkTextBuffer(new GtkTextTagTable());
textBuffer.setText(text, text.length());
GtkTextView textView =3D new GtkTextView(textBuffer);
=09
GtkScrolledWindow scrolledWindow =3D new GtkScrolledWindow();
scrolledWindow.add(textView);
window.add(scrolledWindow);
window.showAll();
Gtk.main();
}=20
public static void main(String[] args) {
Gtk.init(args.length, args);
Editor editor =3D new Editor();
}
}
|