• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 14
Scala Redhat Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..




 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Scala Redhat Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Marshal
Posts: 79962
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic