Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. public class Toolbar extends JToolBar implements ActionListener{
  2.     public Toolbar(Window window) {
  3.         JToolBar toolbar = new JToolBar();
  4.         toolbar.setLayout(new GridLayout(1, 5));
  5.         JButton button = new JButton("Neues Spiel");
  6.         toolbar.add(button);
  7.         toolbar.addSeparator();
  8.  
  9.         toolbar.setPreferredSize(new Dimension(500, 40));
  10.         toolbar.setVisible(true);
  11.         add(toolbar);
  12.     }
  13.  
  14.     @Override
  15.     public void actionPerformed(ActionEvent e) {
  16.  
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement