public void init() {
    frame = new JFrame();
    frame.setLayout(new FlowLayout());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("PersistentFrameTest");
    frame.setSize(400, 200);

    JButton loadButton = new JButton("Load");
    frame.add(loadButton);
    loadButton.addActionListener(EventHandler.create(ActionListener.class, this, "load"));

    JButton saveButton = new JButton("Save");
    frame.add(saveButton);
    saveButton.addActionListener(EventHandler.create(ActionListener.class, this, "save"));

    frame.setVisible(true);
  }
예제 #2
0
 protected void doShift(KeyEvent e) {
   setSelectionModes(e.getModifiersEx());
   super.doShift(e);
 }
예제 #3
0
 protected void doSelect(MouseEvent e) {
   setSelectionModes(e.getModifiersEx());
   super.doSelect(e);
 }