List of usage examples for java.awt BorderLayout NORTH
String NORTH
To view the source code for java.awt BorderLayout NORTH.
Click Source Link
From source file:MainClass.java
public static void main(String args[]) { JFrame f = new JFrame("JToggleButton Sample"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(new JToggleButton("North"), BorderLayout.NORTH); f.add(new JToggleButton("East"), BorderLayout.EAST); f.add(new JToggleButton("West"), BorderLayout.WEST); f.add(new JToggleButton("Center"), BorderLayout.CENTER); f.add(new JToggleButton("South"), BorderLayout.SOUTH); f.setSize(300, 200);/*from www.j av a2 s. c om*/ f.setVisible(true); }
From source file:Main.java
public static void main(String[] argv) throws Exception { // Add the toolbar to a frame JFrame frame = new JFrame(); JToolBar toolbar = new JToolBar(); frame.getContentPane().add(toolbar, BorderLayout.NORTH); frame.pack();//ww w . ja va 2s . c o m frame.setVisible(true); }
From source file:MainClass.java
public static void main(final String args[]) { JFrame frame = new JFrame("Popup JComboBox"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(new BasicArrowButton(BasicArrowButton.NORTH), BorderLayout.NORTH); frame.add(new BasicArrowButton(BasicArrowButton.EAST), BorderLayout.EAST); frame.add(new BasicArrowButton(BasicArrowButton.SOUTH), BorderLayout.SOUTH); frame.add(new BasicArrowButton(BasicArrowButton.WEST), BorderLayout.WEST); frame.setSize(300, 200);// w ww . j a v a 2 s .c om frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) throws HeadlessException, AWTException { Frame frame = new Frame(); Button button1 = new Button("Ok"); frame.add(button1, BorderLayout.NORTH); frame.setSize(50, 55);/*w w w . ja v a 2 s .c o m*/ frame.setVisible(true); button1.setCursor(Cursor.getSystemCustomCursor("MoveDrop.32x32")); }
From source file:Main.java
public static void main(String args[]) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JCheckBox checkBox = new JCheckBox("A"); checkBox.setToolTipText("Italic font"); frame.add(checkBox, BorderLayout.NORTH); frame.setSize(300, 100);//from w w w . ja v a 2 s .co m frame.setVisible(true); }
From source file:MainClass.java
public static void main(String args[]) throws Exception { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JScrollBar oneJScrollBar = new JScrollBar(JScrollBar.HORIZONTAL); frame.add(oneJScrollBar, BorderLayout.NORTH); frame.setSize(200, 44);/* w w w .j a v a 2 s . c o m*/ frame.setVisible(true); }
From source file:Main.java
public static void main(String[] a) { JFrame frame = new JFrame("Selecting CheckBox"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JCheckBox checkBox = new JCheckBox("Hi"); checkBox.getModel().setArmed(false); frame.add(checkBox, BorderLayout.NORTH); frame.setSize(300, 100);/* ww w . jav a 2s .c o m*/ frame.setVisible(true); }
From source file:ButtonTipTest.java
public static void main(String args[]) { JFrame frame = new JFrame("Tool Tips"); Container contentPane = frame.getContentPane(); JButton b = new JButton("Button"); b.setToolTipText("Go Away"); contentPane.add(b, BorderLayout.NORTH); frame.setSize(300, 200);/*from ww w . j av a 2s . com*/ frame.show(); }
From source file:Main.java
public static void main(String[] a) { JFrame frame = new JFrame("Selecting CheckBox"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JCheckBox checkBox = new JCheckBox("Hi"); checkBox.getModel().setPressed(true); frame.add(checkBox, BorderLayout.NORTH); frame.setSize(300, 100);/*from w w w . j a v a2s . co m*/ frame.setVisible(true); }
From source file:Main.java
public static void main(String[] a) { JFrame frame = new JFrame("Selecting CheckBox"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JCheckBox checkBox = new JCheckBox("Hi"); checkBox.getModel().setSelected(true); frame.add(checkBox, BorderLayout.NORTH); frame.setSize(300, 100);//from w w w . j a v a 2 s .com frame.setVisible(true); }