简体   繁体   中英

I cant figure out how to use java gui / layouts?

how can I make a gui interface with everything in order I know the borderlayout, flowlayout and gridlayout but what is panel? im so confused please help in visual basic I just dragged and dropped. im using netbeans 7.1, I can do layouts and stuff the problem is its so confusing to make all these panels and stuff and (x, y) axis where to place them I want the gui nice and neat

how can I make a gui interface with everything in order

For a single column or row, see GridLayout 1 & BoxLayout 2 , as well as JToolBar 3 & JList 4 .

See 'How To Use':

  1. GridLayout
  2. BoxLayout
  3. JToolBar
  4. JList

I was used to creating java GUI with manual coding, I mean not the drag and dropped that auto-generates the codes, so it was a lot easier for me to switch with GUI designer such as Window Builder plugin for Eclipse or the built-in swing designer of NetBeans.

I suggest you to start with the basic of Layout Managers with manual coding. Here's a good link... http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html

Start with the easiest: FlowLayout, GridLayout, and BorderLayout. These layouts are usually applied to JPanel, which is a lower level container (JFrame being the top-level container)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM