This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox" Watch "design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox" New topic
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: 4523
    
    5

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: 37884
    
  22
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox
 
Similar Threads
breaking my dialog into 3 tabs
complex JDBC display problem
BoxLayout not working as advertised?
Not able to read the value of a component on one JPanel from a different JPanel
Inclined Text of JLabel