ciao ragazzi
ho questo codice:
codice:Main_Panel(){ JButton d_ins = new JButton("Inserimento SCRIPT"); JPanel p1 = new JPanel(); JPanel p2 = new JPanel(); JPanel p3 = new JPanel(); setTitle("ScriptManager"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Dimension d = getToolkit().getScreenSize(); setSize(d); Icon icon = new ImageIcon("C:/Documents and ettings/Desktop/Logo_.gif"); getContentPane().add(p); getContentPane().add(l,BorderLayout.NORTH); .... .... } public static void main(String[] args) { Main_Panel sf = new Main_Panel(); }
in pratica dal codice in blu, si nota che è il main che chiama l'istanza interna al codice,
la domnanda è questa, perchè ogni volta che chiamo l'istanza Main_panel me ne ricrea un'altra sopra a quella che avevo già aperta...nn cè un modo per risolvere questo problema
grazie
ciao :master: :master: :master: