File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox

 
Gopi Nash
Greenhorn
Posts: 14
Redhat Scala Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5115
11
Java Netbeans IDE Opera
  • 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gopi Nash
Greenhorn
Posts: 14
Redhat Scala Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47292
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic