jinternalframe

is there any way call other JinternalFrame from an JinternalFrame but, in the desktopPane of of main Jframe.

半城伤御伤魂 提交于 2019-12-06 13:44:34
The "code part 1" below is used for calling UcakListesi(JinternalFrame) from menuItem in MDI application without problem. I would like to call same UcakListesi(JinternalFrame) from another JinternalFrame using same code however, I get error about "desktopPane.add(nw);" line see code part 2. Can't access main jframe desktopPane form JinternalFrame .. is there any way call other JinternalFrame from an JinternalFrame but, in the desktopPane of of main Jframe. sorry for my poor english. Regards and thank you. ---code part 1--- private void UckListeMenuItemActionPerformed(java.awt.event.ActionEvent

making a modal JInternalFrame

我只是一个虾纸丫 提交于 2019-12-06 10:15:13
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? GETah 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

How to get the z order of JInternalFrames in a JDesktopPane

陌路散爱 提交于 2019-12-05 13:35:30
How would one go about getting the z order (layer depth of ) all the JInternalFrames inside a JDesktopPane. There does not seem to be a straight forward way for this. Any ideas? Although I haven't tried this, the Container class (which is an ancestor of the JDesktopPane class) contains a getComponentZOrder method. By passing a Component which is in the Container , it will return the z-order of as an int . The Component with the lowest z-order value returned by the method is drawn last, in other words, is drawn on top. Coupling with the JDesktopPane.getAllFrames method, which returns an array

adding frames to mainFrame

瘦欲@ 提交于 2019-12-04 22:05:11
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 when i tried to use it i couldn't add my old frame to this internal one. You can solve your problems by

May i can use JOptionPane.showConfirmDialog for dispay JInternalFrame?

我是研究僧i 提交于 2019-12-04 17:39:07
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 title bar. Other data are cut from the JInternalFrame . How can I increase size of this dialog? trashgod

How to move minimized components placed at the bottom of the container?

孤者浪人 提交于 2019-12-04 04:02:41
问题 I have three components in a container and buttons in it. When I hit the minimize button the components gets minimized to the bottom of the container and when I hit the minimized component then it gets maximized. Suppose three components are lying at the bottom and if I maximize the 2nd component then it gets maximized and the 3rd minimized component does not take the position of the 2nd and this remains as space. Screenshot package Project; import java.awt.Dimension; import java.awt

Create JInternalFrames and save the one which is selected

一世执手 提交于 2019-12-02 16:13:19
问题 I am learning Java now and I was wondering how to create JInternalFrames in a JFrame and save them as files. I draw some objects on the internal frames and I have a button 'Save'. For example, there are several of the internal frames and I want to save the one which is selected. May someone provide me with simple code on how to do this? Only the frames and how to save them. 回答1: Read the JDesktopPane API. You will find a method that will get you the currenctly selected internal frame. Check

JInternalFrame to front and focussed

元气小坏坏 提交于 2019-12-02 06:22:49
问题 How does one push a JInternalFrame to the top of all the frames in a JDesktopPane? 回答1: Read the JInternalFrame API and follow the link to the Swing tutorial on "How to Use Internal Frames" where you will find a working example of how to "select" the active internal frame. 回答2: try grabFocus() and requestFocus(). One of the should work. I personally used only requestFocus(). 回答3: In this example, a javax.swing.Action is used to select frames from a menu. 回答4: The OP has noted that setSelected

Scaling and zoom

南笙酒味 提交于 2019-12-02 00:50:17
问题 I need to implement zoom for a JDesktopPane contained in a JScrollPane . I have had prior success zooming by overriding the paintComponent(...) method and calling scale(double,double) . This is not working properly: the JInternalFrame 's and JPanel 's scale as intended, but the MouseListener 's for the JLabel 's and such register at the pre-scaled locations. What can I do? Thank you for reading. 回答1: ScaledPanel shows how to scale mouse coordinates using explicit transformation methods:

Scaling and zoom

爱⌒轻易说出口 提交于 2019-12-01 22:03:13
I need to implement zoom for a JDesktopPane contained in a JScrollPane . I have had prior success zooming by overriding the paintComponent(...) method and calling scale(double,double) . This is not working properly: the JInternalFrame 's and JPanel 's scale as intended, but the MouseListener 's for the JLabel 's and such register at the pre-scaled locations. What can I do? Thank you for reading. trashgod ScaledPanel shows how to scale mouse coordinates using explicit transformation methods: scaleX , scaleY , unScaleX and unScaleY . Alternatively, you can use an inverse transformation, as shown