import java.awt.Color;
import java.awt.Cursor;
import java.awt.FlowLayout;
import java.awt.color.ColorSpace;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JToggleButton;
import javax.swing.border.TitledBorder;
import javax.swing.plaf.basic.BasicArrowButton;
public class Buttons extends JFrame {
private JButton jb = new JButton("JButton");
private BasicArrowButton
north = new BasicArrowButton(BasicArrowButton.NORTH),
south = new BasicArrowButton(BasicArrowButton.SOUTH),
east = new BasicArrowButton(BasicArrowButton.EAST),
west = new BasicArrowButton(BasicArrowButton.WEST),
north_east = new BasicArrowButton(BasicArrowButton.NORTH_EAST),
north_west = new BasicArrowButton(BasicArrowButton.NORTH_WEST),
south_east = new BasicArrowButton(BasicArrowButton.SOUTH_EAST),
south_west = new BasicArrowButton(BasicArrowButton.SOUTH_WEST);
public Buttons() {
setLayout(new FlowLayout());
add(jb);
add(new JToggleButton("jtoggleButton"));
add(new JCheckBox("checkBox"));
add(new JRadioButton("radioBox"));
JPanel jPanel = new JPanel();
Cursor cursor = new Cursor(Cursor.HAND_CURSOR);
TitledBorder titledBorder = new TitledBorder("Directions");
jPanel.setCursor(cursor);
jPanel.setBackground(Color.GRAY);
titledBorder.setTitle("Title Directions");
titledBorder.setTitleColor(Color.RED);
titledBorder.setTitlePosition(TitledBorder.CENTER);
jPanel.setBorder(titledBorder);
jPanel.add(north);
jPanel.add(south);
jPanel.add(west);
jPanel.add(east);
jPanel.add(north_east);
jPanel.add(north_west);
jPanel.add(south_east);
jPanel.add(south_west);
add(jPanel);
}
public static void main(String[] args) {
SwingConsole.run(new Buttons(), 400, 300);
}
}