public class Grafica extends Frame implements WindowListener, MouseListener{ private final TextArea t1; private final Panel p1; private final Button b1; public Grafica(){ super("Blocco note"); setLayout(null); setLocation(0, 0); setResizable(false); setSize(800, 600); p1 = new Panel(); p1.setSize(500,200); p1.setLocation(50, 30); p1.setBackground(Color.red); t1 = new TextArea(); t1.setSize(50, 50); t1.setLocation(80, 40); p1.add(t1); b1 = new Button("Salva"); b1.setSize(50,20); b1.setLocation(380/2, 180+30); p1.add(b1); add(p1); addWindowListener(this); setBackground(Color.CYAN); setVisible(true); } public void windowOpened(WindowEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void windowClosing(WindowEvent e) { dispose(); } public void windowClosed(WindowEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void windowIconified(WindowEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void windowDeiconified(WindowEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void windowActivated(WindowEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void windowDeactivated(WindowEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void mouseClicked(MouseEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void mousePressed(MouseEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void mouseReleased(MouseEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void mouseEntered(MouseEvent e) { throw new UnsupportedOperationException("Not supported yet."); } public void mouseExited(MouseEvent e) { throw new UnsupportedOperationException("Not supported yet."); } }