LayoutDemo - public static void main (String args) { JFrame...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // LayoutDemo.java Authors: Lewis/Loftus // // Solution to Programming Project 9.1 // //******************************************************************** / import javax.swing.*; i public class LayoutDemo { //----------------------------------------------------------------- // Sets up a frame containing a tabbed pane. The panel on each // tab demonstrates a different layout manager. //-----------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public static void main (String args) { JFrame frame = new JFrame ("Layout Manager Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JTabbedPane tp = new JTabbedPane(); tp.addTab ("Intro", new IntroPanel()); tp.addTab ("Flow", new FlowPanel()); tp.addTab ("Border", new BorderPanel()); tp.addTab ("Grid", new GridPanel()); tp.addTab ("Box", new BoxPanel()); frame.getContentPane().add(tp); frame.pack(); frame.setVisible(true); } }...
View Full Document

Ask a homework question - tutors are online