jinternalframe

Disabling the shadow around JInternalFrames with the Aqua Look and Feel

拈花ヽ惹草 提交于 2019-12-11 08:52:26
问题 On Mac OS X with the native Aqua Look and Feel, JInternalFrames have a shadow that is part of the frame border. When the internal frame is maximized, the shadow is still visible and takes a lot of space. Is there a way to remove this shadow without switching to another look and feel? 回答1: After digging into the Aqua L&F code in OpenJDK I found an undocumented property that let you change the style of an internal frame. Shadows can be removed with this: internalFrame.putClientProperty(

How to setVisible a JinternalFrame in the center of the JdesktopPane?

China☆狼群 提交于 2019-12-11 06:37:10
问题 Actually i wanna show the JinternalFrame in the center of the JDesktopPane and i used this methode as i use it in Jframes but it didn't work : Extraction ex=new Extraction();//Extraction is the name of the JintenalFrame jDesktopPane1.add(ex); ex.setLocationRelativeTo(this); ex.setVisible(true); So i am asking if there is another methode so i can display the JinternalFrame in the center of the JdesktoPane. Thank you 回答1: A javax.swing.JInternalFrame lacks the convenient setLocationRelativeTo

How I can selected by default an InternalFrame on a JDesktopPane?

风格不统一 提交于 2019-12-11 04:59:39
问题 I have a JFrame with the JDesktopPane and inside the JDesktopPane, I launch with the constructor a JInternalFrame. (Its a app like the authentification users, with the textbox user and textbox pass) I lauch the internal like this: MyInternalFrame internalF = new MyInternalFrame(); desktopPane.add(internalF); I try with: internalF.setVisible(true); internalF.setSelected(true); desktopPane.getDesktopManager().activateFrame(internal); desktopPane.setSelectedFrame(internal); How I can lauch the

adding frames to mainFrame

孤人 提交于 2019-12-10 00:32:43
问题 i want to add some frame to my main frame, lets say we've 3 frames (Frame1, Frame2, and Frame3) i want to: Create new Frame called Frame 4 and add menu bar with items (View Frame1, View Frame2, View Frame3) --> actually i've created this frame successfully. When click on View Frame1 i want to display Frame1 in a certain place in Frame4 and so on for all menuItems My problem is i've created my old frames by using Drag-and-drop tech. in net beans There is a component called internalFrame but

May i can use JOptionPane.showConfirmDialog for dispay JInternalFrame?

天大地大妈咪最大 提交于 2019-12-09 21:58:00
问题 May i can use JOptionPane.showConfirmDialog for display JInternalFrame ? I tried following code: OPD.Registration opdRegister = new OPD.Registration(); //OPD.Registration is extending JInternalFrame int ns=JOptionPane.showConfirmDialog(null, opdRegister, "Billing", JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE); // i am trying to call opdregister in this Confirm Dialog Box. By using above code that display dialog box with JInternalFrame but it not display proper. It display only

Changing DesktopIcon.width on nimbus

耗尽温柔 提交于 2019-12-08 04:55:52
问题 I'm trying to change the JInternalFrame iconifying size, I've tried changing the L&F defaults with javax.swing.UIManager.put("DesktopIcon.width", 300); but it doesn't work on Nimbus, I've also tried changing the DesktopIconUI with javax.swing.UIManager.put("DesktopIconUI", javax.swing.plaf.basic.BasicDesktopIconUI.class.getName()); but as soon as I minimize the JInternalFrame it dissapears, any sugestions? 回答1: You might be able to override the getBoundsForIconOf(JInternalFrame) method of

making a modal JInternalFrame

本秂侑毒 提交于 2019-12-08 02:04:39
问题 I need to get lots of data (file select , text, date ,...) from user in a MDI JFrame. I need the input form that is a JInternalFrame be modal. How Can I make a JInternalFrame modal? 回答1: From my experience, I have never managed to make JInternalFrame modal and don't think that is possible out of the box. See this great article on an extension to JInternalFrame to make them modal ( thanks to Steve Webb ). 来源: https://stackoverflow.com/questions/11177003/making-a-modal-jinternalframe

JInternalFrame As Modal

狂风中的少年 提交于 2019-12-07 18:07:28
I Have the following code: import java.awt.AWTEvent; import java.awt.ActiveEvent; import java.awt.Component; import java.awt.EventQueue; import java.awt.MenuComponent; import java.awt.event.MouseEvent; import javax.swing.JInternalFrame; import javax.swing.SwingUtilities; public class modalInternalFrame extends JInternalFrame { // indica si aquest es modal o no. boolean modal = false; @Override public void show() { super.show(); if (this.modal) { startModal(); } } @Override public void setVisible(boolean value) { super.setVisible(value); if (modal) { if (value) { startModal(); } else {

JDesktopPane resize

送分小仙女□ 提交于 2019-12-06 20:06:44
问题 We have a application with two JFrames with two JDesktopPanes. We need to move an internal frame from one frame to another. The problem we have is that after we move the internalframe from first window to the second window, when we resize the fist window, the internal frame of the second window also gets resized. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.beans.PropertyVetoException; import javax.swing.JDesktopPane; import javax.swing.JFrame; import

Changing DesktopIcon.width on nimbus

独自空忆成欢 提交于 2019-12-06 14:53:07
I'm trying to change the JInternalFrame iconifying size, I've tried changing the L&F defaults with javax.swing.UIManager.put("DesktopIcon.width", 300); but it doesn't work on Nimbus, I've also tried changing the DesktopIconUI with javax.swing.UIManager.put("DesktopIconUI", javax.swing.plaf.basic.BasicDesktopIconUI.class.getName()); but as soon as I minimize the JInternalFrame it dissapears, any sugestions? You might be able to override the getBoundsForIconOf(JInternalFrame) method of DefaultDesktopManager : import java.awt.*; import javax.swing.*; public class DesktopIconWidthTest { public