I woold like to ask how can i create dynamicly textfields, and how to handle the content of them after the creation???
i have a variable which says how many textfields i will have.
I have i JFrame,Jbutton and Jpanel created with the netbeans GUI (WITH THE PALLET ).
I need to press the Jbutton and to appear the 10 Jtexfields in the Jpanel, But sometimes maybe will be more than 10 it depends of the counttextfields variable.
I have try something like this but doesn't worked.
Does this even compile? Please PostRealCode (<=This is a link. Click to read)
Whenever you add/remove components from a container which is already being displayed, the best way to refresh the UI is to call a revalidate() and repaint() on the container.
i read that Netbeans is very good tool.
I know about this tutorial.
Bu t the problem is that i didnt found something about that i need.
Dynamic variable names and dynamic textfield creation and handling.
I s there any example about those???
cha kio wrote:i read that Netbeans is very good tool.
If you're referring to the NetBeans visual designer, sure it's a good tool. And like any good tool, it has a fairly steep learning curve.
Learning to use the visual designer effectively is greatly facilitated once you already know how to hand-code a GUI. Trying to learn both Swing coding and the quirks of a visual designer simultaneously, now that I wouldn't recommend.
cha kio wrote:I know about this tutorial.
Bu t the problem is that i didnt found something about that i need.
Dynamic variable names and dynamic textfield creation and handling.
Try going through some other sections of the Oracle tutorial. Like the ones that deal with arrays and collections. Those are more fundamental topics than Swing, so you need to learn them first.
cha kio wrote:I s there any example about those???
One question mark is enough.
luck, db
There are no new questions, but there may be new answers.
Even better: here's a link to the part of the Oracle tutorial which covers arrays: Arrays. Java has plenty of good tutorials and they are easy to find on the web. If you're looking for a tutorial about concept X in the Java language then your Google keywords are "java X tutorial". If you see an Oracle tutorial in the list, you should read that one in preference to others which might appear.