Dynamically Adding Components into Panel

  • Thread starter Sourabh Mhaisekar
  • Start date
S

Sourabh Mhaisekar

Hello there, I want to add some Swing components dynamically depend on user's input. Those components will be used to create database table. But I am facing problem of aligning them properly, any suggestions ?

Thank you !
 
J

Joerg Meier

Hello there, I want to add some Swing components dynamically depend on user's input. Those components will be used to create database table. But I am facing problem of aligning them properly, any suggestions ?

Use one of the various LayoutManagerS. There are a variety that come with
Java, as well as some very useful 3rd party alternatives. If you had HTML
exposure, you might find TableLayout the most intuitive - it's a lot like
tables in HTML.

For the Sun/Oracle LMs, check out:

http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html

Liebe Gruesse,
Joerg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top