Re: [Java-gnome-developer] A little Problem
Brought to you by:
afcowie
From: Arx H. <ar...@gm...> - 2005-05-27 05:29:59
|
try this: or better, put in button.addlisntener this button1.addListener(new ControlExample()); you dont need getControl method > package presentation.programm; > import org.gnu.gtk.*; > import org.gnu.glade.*; > import org.gnu.gnome.Program; > import control.ControlExample; >=20 >=20 > public class Example{ > Button button; > ControlExample control =3D new ControlExample(); >=20 > public Example() { > try { > LibGlade glade =3D new LibGlade("glade/2.glade", = this); > button =3D (Button) glade.getWidget("button1"); > } catch (Exception e) { > } > button.addListener(getControl()); > } > public ControlExample getControl(){ > return this.control; > } > public static void main(String[] args) { > Program.initGnomeUI("Hello", "0.1", args); > new Example(); > Gtk.main(); > } > } >=20 > -------------- End Example.java -------------------- |