| Author |
design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox
|
Gopi Nash
Greenhorn
Joined: Sep 26, 2011
Posts: 14
|
|
Hi
I want to design the Java swing with validation
Please share your ideas
One Button will be available in Top . When clicking the button it should create the JTextfield,JLabel,Jcombobox
It should satisfy the Grid bag constraints
Object of components will be created dynamically
tell anyone who expert in java to develop it..
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4165
|
|
Given the broad nature of your question, the best I can do is point you to the Swing Tutorial.
Just one addition you may not get from the tutorial: when adding/removing components to/from an already visible/realized GUI, be sure to call revalidate() and repaint() on the enclosing container. Or, in the scenario you describe, you may want to call pack() on the top level window instead.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Gopi Nash
Greenhorn
Joined: Sep 26, 2011
Posts: 14
|
|
Darryl Burke wrote:Given the broad nature of your question, the best I can do is point you to the Swing Tutorial.
Just one addition you may not get from the tutorial: when adding/removing components to/from an already visible/realized GUI, be sure to call revalidate() and repaint() on the enclosing container. Or, in the scenario you describe, you may want to call pack() on the top level window instead.
Thanks.. I tried your ideas.. Got it .. but faced challenge in Validation with Text Field and Combo box
Hard to get the the reference for single component
Because all components are generated dynamically
Please help me..
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32689
|
|
You will have to explain the problem much more before anybody can help you.
You may be trying to do too much at once. Add one Component at a time, compiling and running your app after each new Component.
|
 |
 |
|
|
subject: design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox
|
|
|