From: Kay Krüger-B. <ka...@we...> - 2008-10-01 14:43:45
|
Hi, I suspect you get an error message somewhat like "mygroup is undefined". That's because syntactically the argument of the group attribute is a method call and therefore gui4j looks for a method definition like public void mygroup() {} in the corresponding controller. (see http://www.gui4j.org/gui4jdocs/methodCalls.html for the documentation on method call syntax.) One simple solution in this case is to use the gui4j notation for string constants where syntactically method calls are expected. This notation is to use single quotes ('). Try to change your example to (not the single quotes around mygroup): <radioButton guiId="radio1" text="'Active'" group="'mygroup'" /> <radioButton guiId="radio2" text="'Deleted'" group="'mygroup'" /> Hope it helps. May I ask what purpose you are using gui4j for? We still use it internally in our company (where gui4j originated) but we had very little feedback from the community after making it open source in 2005. Thanks, Kay > -----Ursprüngliche Nachricht----- > Von: "Linu Hila" <lin...@ya...> > Gesendet: 30.09.08 12:02:40 > An: gui...@li... > Betreff: [Gui4j-user] radio buttons grouped > > > Hello > I am creating an interface with the use of gui4j and it requires 2 > radio buttons. They have to be in the same group, in order to be able > to choose one at a time. I cannot find a way to do this,please help > me. > > <radioButton guiId="radio1" text="'Active'" group = "mygroup" /> > <radioButton guiId="radio2" text="'Deleted'" group = "mygroup" /> > > i understood from the documentation that there is an attribute "group" > that holds the radio buttons,but if i try to associate a value to it, > i am forced to define it ,and i don't know a way to define a group > element. > How can i make the radio buttons be active one at a time? > I would greatly appreciate the code for this. > Thanks, have a nice day > > > > --------------------------------------------------------------------- > ---- This SF.Net email is sponsored by the Moblin Your Move Developer' > s challenge Build the coolest Linux based applications with Moblin > SDK & win great prizes Grand prize is a trip for two to an Open > Source event anywhere in the world http://moblin-contest.org/redirect. > php?banner_id=100&url=/ _____________________________________________ > __ Gui4j-user mailing list Gui...@li... https:// > > lists.sourceforge.net/lists/listinfo/gui4j-user ________________________________________________________________________ Schon gehört? Bei WEB.DE gibt' s viele kostenlose Spiele: http://games.entertainment.web.de/de/entertainment/games/free/index.html |