ciao ragazzi
non riesco a visualizzare una immagine jpg questo è il mio codice:
cosa sbaglio??? :master:codice:JFrame f = new JFrame(); JLabel ll = new JLabel(); JPanel pa = new JPanel(new GridBagLayout()); Icon icon2 = new ImageIcon("C:/gax.jpg"); ll.setIcon(icon2); pa.add(ll,c); f.getContentPane().add(pa); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.gridwidth = 3; c.fill = GridBagConstraints.BOTH; pa.add(ll,c);