From: Bob J. <jac...@us...> - 2003-05-11 04:17:44
|
Update of /cvsroot/jmri/jmri/jmrit/display In directory sc8-pr-cvs1:/tmp/cvs-serv12934 Modified Files: PanelEditor.java Log Message: force rescan before reusing file chooser so new files are detected Index: PanelEditor.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/display/PanelEditor.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** PanelEditor.java 7 May 2003 17:54:52 -0000 1.22 --- PanelEditor.java 11 May 2003 04:17:42 -0000 1.23 *************** *** 394,401 **** void addBackground() { JFileChooser inputFileChooser = new JFileChooser(" "); ! int retVal = inputFileChooser.showOpenDialog(this); ! if (retVal != JFileChooser.APPROVE_OPTION) return; // give up if no file selected log.debug("Open image file: "+inputFileChooser.getSelectedFile().getPath()); ! NamedIcon icon = new NamedIcon(inputFileChooser.getSelectedFile().getPath(), inputFileChooser.getSelectedFile().getPath()); JLabel l = new PositionableLabel(icon); --- 394,401 ---- void addBackground() { JFileChooser inputFileChooser = new JFileChooser(" "); ! int retVal = inputFileChooser.showOpenDialog(this); ! if (retVal != JFileChooser.APPROVE_OPTION) return; // give up if no file selected log.debug("Open image file: "+inputFileChooser.getSelectedFile().getPath()); ! NamedIcon icon = new NamedIcon(inputFileChooser.getSelectedFile().getPath(), inputFileChooser.getSelectedFile().getPath()); JLabel l = new PositionableLabel(icon); *************** *** 403,406 **** --- 403,407 ---- putBackground(l); } + public void putBackground(JLabel l) { target.add(l, BKG); |