[英]Center Screen JFileChooser
我想將JFileChooser
的位置設置在JInternalFrame
的中心:
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);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.