-2

What is the best library to use in Java for a simple layout.

Here is an image of what I am wanting to have on the form.

enter image description here

I am looking for the most simplest layout library, that also has good positioning features.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
user2381256
  • 101
  • 2
  • 2
  • 5
  • 3
    I can see a `BorderLayout` and possibly a `GridBagLayout`. Check out [A Visual Guide to Layout Managers](http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html) for better ideas – MadProgrammer May 17 '13 at 06:48

5 Answers5

2

See the Nested Layout Example for ideas about how to combine layouts to create the required layout.

Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
2

I'm assuming that you want to use Java Swing since you named your components with a J.

The outer JPanel could use a BorderLayout. The JList would be inside of a JScrollPane. The JScrollPane would be in the center, the radio button panel would be in the west, and the Jbutton would be in the south.

The radio button panel would use a GridBagLayout to get the buttons to be the same size and so you can specify the pixel spacing (insets) between the radio buttons. This panel would be placed inside another JPanel with a FlowLayout to keep the radio buttons from spreading out and taking up the whole panel.

Read this interesting article, Sudoku Solver Swing GUI, for more information on how to layout a Swing GUI.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
0

I would try it with Swing. Or is that too complex?

GarfieldKlon
  • 11,170
  • 7
  • 31
  • 33
0

There are total 8 layout managers in JAVA library.

There is also one free open source which you can use is MigLayout.

Its Easy to use yet very powerful Java Swing, JavaFX 2 and SWT layout manager,

Java
  • 2,451
  • 10
  • 48
  • 85
0

Use Swings.And IDE you can prefer NetBeans as in netbeans you can drag and drop to create UI,which is quite easy compare to coding

saum22
  • 884
  • 12
  • 28