// --------------------refresh Window---------------------------------- private void neu(int xx, int yy) { XX = xx; YY = yy; lastButtonY = 0; lastButtonX = 0; lastIcon = null; firstClick = true; window.getContentPane().removeAll(); baueButton(); window.revalidate(); }
public static void main(String[] args) { JFrame frame = new JFrame("Network Tables"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationRelativeTo(null); Display display = new Display(); frame.getContentPane().add(display); frame.setLocation(0, 0); frame.setSize(new Dimension(2000, 700)); frame.revalidate(); frame.repaint(); frame.setVisible(true); }