jinternalframe

Adding jinternalframe class to jdesktoppane using other jinternalframe class

筅森魡賤 提交于 2019-12-20 03:23:50
问题 I'm creating a very simple program. I have created this classes : MainJframeClass, JDesktopPaneClass, JinternalFrameClass1 and JinternalFrameClass2. what ive done is that i instantiated my jdesktoppaneclass and named it desktoppane1 and i added it to the MainJframeclass. i have also instantiated the 2 jinternalframes and named it internal1 and internal2. Now, i have button in mainjframeclass that when i press, i add the internal1 to desktoppane1. what my problem now is how to add the

how to make JInternalFrame fill the Container and disable the dragging feature?

时光毁灭记忆、已成空白 提交于 2019-12-20 02:56:46
问题 I'm working on a project, there are JInternalFrames in the mainframe. Now, we need to let them to be JFrame. I'm considering using a JFrame to hold on JInternalFrame. The problem is that the titlebar of Internalframe is there, and user can drag it around. Is there any way to make the Internal frame work like a pane in the JFrame? After searching on the Internet, I found somebody removes the titlepane. Do you have any good idea on this? Thanks you! update: Maybe I was on the wrong track. The

Example Program JMenubar on JInternalFrame when i Maximize the JInternalFrame

十年热恋 提交于 2019-12-19 21:25:17
问题 Hi I need an Example program in which When i maximize the JInternalFrame the JMenuBar of JFrame should set on JInternalFrame and When i minimize the JInternalFrame again the JMenuBar should leave JinternalFrame and set to JFrame as shown below Please provide me an Example Program in Java Swing 回答1: Seems to work fine, please post SSCCE to show specific problem: import java.awt.*; import java.awt.event.*; import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing

hiding title bar of JInternalFrame? -java

妖精的绣舞 提交于 2019-12-18 04:09:35
问题 I found some code online, I edited it a bit. I want to hide title bar of a JInternalFrame. JInternalFrame frame = new JInternalFrame(); // Get the title bar and set it to null setRootPaneCheckingEnabled(false); javax.swing.plaf.InternalFrameUI ifu= frame.getUI(); ((javax.swing.plaf.basic.BasicInternalFrameUI)ifu).setNorthPane(null); frame.setLocation(i*50+10, i*50+10); frame.setSize(200, 150); //frame.setBackground(Color.white); frame.setVisible(true); desktop.add(frame); The problem is that

How to change jdesktoppane default background image?

爷,独闯天下 提交于 2019-12-18 01:07:10
问题 How to change jdesktoppane background image in MDI (Multiple Documents interface) using java netbeans? Means I added the jdesktoppane to java MDI so now I want to change default background image of that jdesktoppane which I'm using in java MDI. Any easy way? Check attached snapshot link may be you will better understand my question what I want. http://i50.tinypic.com/iml1e9.jpg 回答1: +1 to MadProgrammers comment. Simply override JDesktopPane paintComponent(..) and call drawImage(Image img,int

Java method works on windows but not Macintosh?

自作多情 提交于 2019-12-17 16:48:11
问题 I had a real weird method which is used to hide JInternalFrame 's title bar. Now the dilemma is below method works on windows platform, ((javax.swing.plaf.basic.BasicInternalFrameUI) aXInternalFrame.getUI()).setNorthPane(null); But not on Macintosh! Any experts have any idea which can explain internal process which makes this method not usable on Mac. And is there any method which may work on both platform to hide titlebar of JInternalFrame ? Thanks 回答1: On Mac OS X, an instance of com.apple

Minimizing Jinternal Frame without clicking the button

自古美人都是妖i 提交于 2019-12-17 06:56:31
问题 Is there any way to minimize/maximize the JinternalFrame without clicking the minimize/maximize button at the top-right corner of the jinternalframe? I followed this thread programmatically minimize a JInternalFrame?, specifically set jinterframe.setIcon(false) But i didn't work. Thanks. 回答1: works as I expected, you have to check JInternalFrame#isIconifiable() (eeerght this Veto is really ****) import java.awt.*; import java.awt.event.*; import java.beans.PropertyVetoException; import javax

Adding JDesktopPane to JFrame using GridBagLayout

我的梦境 提交于 2019-12-14 03:29:28
问题 How do I add the JDesktopPane to JFrame using GridBagLayout and set its height and width. If I add JDesktopPane that contains JInternalFrame I don't get anything. But works well in case of GridLayout but the problem is I can't set my desired size in it as GridLayout splits equal space among each component added. 回答1: You will probably need to set the fill and weight attributes of the GridBagConstraints ... GridBagConstraints gbc = new GridBagConstraints(); gbc.weightx = 1; gbc.weighty = 1;

Scroll bar en JInternalFrame?

蹲街弑〆低调 提交于 2019-12-14 03:29:09
问题 I have a question. I have a JInternalFrame, with input-texts, combo-boxes, panels, almost finalized... but, it is bigger than the JFrame... I don't want to do all back.. So, Can I add a scroll bar without add a scroll panel? How I to do? Sorry for my English. 回答1: Can I add a scroll bar without add a scroll panel? How I to do? Why not use a JScrollPane? Simply add your main JPanel or contentPane to a JScrollPane, add it to your JInternalFrame, and you're done. This is really you're only

Java - How to make a set of JInternalFrame independant of each other?

我怕爱的太早我们不能终老 提交于 2019-12-13 17:57:57
问题 I'm programming a short Paint program like and I'm trying to make an MDI architecture for it. To make that happen, I used JInternalFrame inside a JDesktopPane. Although I kind of obtain multiple frames, there are not really working properly. Basically, if I have 2 JInternalFrame I can draw only on the last one. The other one seems to be disabled. Here is a short video illustrating the problem. http://bit.ly/9ydiwM Here are some part of the code. Panneau.java public class Panneau extends