I'm quite new to Java and I'm having some problems with swing. I create a very simple GUI program I'm trying to make a set of buttons, but my code does not work.
This is my code;
myPanel = new zpn (); Jebton Mitton = New Pocket ("Create Button"); MyButton.addActionListener (New Exhibitist) {Public Zero ActionPerfed (Action Event E) {Ent Val = Integer. PRIIT (Textfield.Gettext); for (IntiI = 0; I & lt; Well; I ++) {Jebton Button = New Payton (""); Button. Set Text (string.value (I)); myPanel.add (button);}}});
But when I click on the button "Make button", then nothing happens, can anyone tell me what I am missing?
You already have:
myPanel.revalidate ()
Comments
Post a Comment