Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Otto Gál
Greenhorn
+ Follow
news
2
Posts
0
Threads
since Dec 05, 2008
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by Otto Gál
Builing First GUI - A few questions
hi,
I also have an app with the same GUI - an infoPanel and a gamePanel, they are in the mainPanel
this is how I did it, and it works fine:
these are just those parts of the code where the layout is important:
infoPanel = new JPanel(); infoPanel.add(new JLabel("Number of moves: ")); infoPanel.add(movesText); layout = new GridLayout(rowLength,rowLength); gamePanel = new JPanel(layout); mainPanel = new JPanel(); mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS)); mainPanel.add(infoPanel); mainPanel.add(gamePanel); frame.setContentPane(mainPanel);
have you tried to change the
application.add(contentPanel);
to
application.setContentPane(contentPanel);
?
show more
15 years ago
Swing / AWT / SWT
System Tray icon for the Swings application
http://java.sun.com/docs/books/tutorial/ui/features/tray.html
show more
15 years ago
Swing / AWT / SWT