This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Need strategy for developing swing component. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need strategy for developing swing component." Watch "Need strategy for developing swing component." New topic
Author

Need strategy for developing swing component.

Swaroop Kunduru
Ranch Hand

Joined: May 22, 2006
Posts: 37
Hello All,

I have to develop a dialog component with tabs in it.

On each tab there are several groups.

In each group there are 3 rows.

Each row have several components like textbox, combobox, radio buttons.

Please let me know what are the best strategies to develop above UI window.

How to lay and group the components on window?

Please see the attachment image.

Thanks in advance.

Regards,

Swaroop Kunduru.



[Thumbnail for Temp.PNG]



Regards,
Swaroop Kunduru
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4087
    
  18

I would probably first make a separate class for your groups. They all look the same, and you will benefit from making a class out of them.

The group can simply be an extension of JPanel, and you can use a BoxLayout to manage the rows, and each row can use another BoxLayout for its components.

Then, on each tab you can use another BoxLayout to add your groups. For the tabs, you can simply use a JTabbedPane.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20128
    
  30

And you can use a TitledBorder for the lines / labels around the two groups of controls.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Swaroop Kunduru
Ranch Hand

Joined: May 22, 2006
Posts: 37
Rob Spoor wrote:And you can use a TitledBorder for the lines / labels around the two groups of controls.


Thanks for both of you.

I have it done in pannels.

Command panel is giving trouble in adjusting buttons.

Regards

Swaroop Kunduru.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need strategy for developing swing component.
 
It's not a secret anymore!