[Java-gnome-developer] Glade and using widgets
Brought to you by:
afcowie
From: Alex M. <ale...@gl...> - 2003-12-14 13:59:05
|
Hi, i´m begining to work with glade and i have some questions. In glade, you can create new widgets like GnomeAbout. Ok, thats fine but, how can i use this widget, for example, for make it visible when the about button is pressed? I´ve been trying this (see bellow code), but GnomeAbout is not a java-gnome class. How can use the GnomeAbout (or any other widget) which i created in glade? ----- java-gnome source public class FirstGlade { private static final String GLADE_FILE = "keymaster.glade"; //private final About about; private LibGlade libglade; public FirstGlade() throws IOException { libglade = new LibGlade(GLADE_FILE, this); HERE ----> GnomeAbout about = .... //clock = new ; } public void on_button3_clicked(){ System.out.println("button 3 pressed"); //about.getClass(); } public void on_button4_clicked(){ System.out.println("button 4 pressed"); } public void gtk_widget_show(){ System.out.println("pressed"); //about.show(); //about. } public static void main(String[] args) { FirstGlade gui; //about = new About("titulo", "version", "license", "comments", //"authors", "documenters", "translator"); Gtk.init(args); try { gui = new FirstGlade(); } catch (IOException e) { System.err.println(e.toString()); System.exit(1); } Gtk.main(); } } -- Alex Moreno |