hi
can we use a JInternalFame with a button into the main fram (by JDesktopPane of corz), the button that open up the JInternalFame ? how?
thks
hi
can we use a JInternalFame with a button into the main fram (by JDesktopPane of corz), the button that open up the JInternalFame ? how?
thks
I don't really understand the question so I will just make some observations.
a) a JInternalFrme is like a frame in that you can add any component to it that you want
b) A JButton works the same whether it is added to an internal frame or a frame
I suggest you start by reading the Swing tutorial for working examples. You might start with the sections on "How to Use Internal Frames" and "How to Use Buttons".
If you still have problems then post your SSCCE that shows what you have tried.
I don't know a way to put a JButton
directly on a JDesktopPane
, but you can use menu items to create and select a JInternalFame
. In this example, each menu item uses an Action
defined in the JInternalFame
to select the corresponding frame.
Addendum: as @camickr suggests, it is technically possible to put a JButton
directly on a JDesktopPane
, but it might prove difficult to use in practice.
I tried to put a JButton on the main frame but if i do so the button covers the internalframe or the internalframe covers the button,
I also tried to put a background in the main frame but it is the same problem the image covers the internalframe or the internalframe covers the image,
why I do this?
because the main frame with a gray or white background color is prety ugly this is why i want to put some buttons or background