求助::repaint()不掉用paint(),谁知道啊~我快疯了。。。。我跟过,就不到paint方法里
public void actionPerformed(ActionEvent e){
fdlg.setVisible(true);
chooseField.setText(fdlg.getDirectory()+fdlg.getFile());
URL=fdlg.getDirectory()+fdlg.getFile();
repaint();
}
public void paint(Graphics g){
paintImage1=new paintImage(URL);
n = new DrawPanel(new Dimension(400,300));
n.removeAll();
n.repaint();
n.setImage(n.getToolkit().getImage("c:\\"+nowShow+"."+"jpg"));
n.setLayout(null);
paintPanel.add(n);
mainFrame.getContentPane().add(n,BorderLayout.EAST);
mainFrame.setSize(680,280);
mainFrame.show();
}