私は私のJInternalFrame
の中心に私のJFileChooser
の場所を設定したい:センター画面JFileChooserの
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
fileChooser.setLocation();
私は私のJInternalFrame
の中心に私のJFileChooser
の場所を設定したい:センター画面JFileChooserの
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
fileChooser.setLocation();
あなたはすべてのコンポーネントで、あなたのJFileChooser
を埋め込むことができます。
// Your JInternal Frame
JInternalFrame inFrame = new JInternalFrame("", true, true, true, true);
// Your JFileChooser
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
// put filechooser in internal frame
inFrame.add(fileChooser);
fileChooser.showOpenDialog(null);
詳細を編集してください。コード専用と「試してください」の回答は、検索可能なコンテンツが含まれていないため、推奨されません。なぜ誰かが「これを試してみる」べき理由を説明しません。 – abarisone
コメントありがとうございましたが、これはfileChooser.showOpenDialog(ヌル)より効果的です。 – MACP