Re: [Java-gnome-developer] How to use a Glade UI (.glade file) in a Java Gnome/GTK program?
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2013-01-16 11:20:18
|
On Mon, 2013-01-14 at 09:11 -0200, Igor H. Vieira wrote: > I've did a research on the Internet looking for > tutorials/documentations In the java-gnome source tree there is an example at tests/prototype/Designer.java ; you might have a look at that and give it a try? > I already know how to create a UI from the code using the Java > Gnome/GTK. You're probably better off just doing that, then. To be honest, that's what we tend to recommend; Glade always seems like such a great idea, but pretty soon you end up needing to write code to do non-trivial work anyway, at which point the complexity of dealing with .ui files & code is greater than just having code. Speaking personally, button = new Button(); button.setLabel("Hello"); and button = (Button) builder.getObject("button42") button.setLabel("Hello"); amounts to much the same thing while the latter is definitely more fragile in the face of change. IMHO, anyway. AfC Sydney |