Forums Register Login

Using Ctrl-Tab to change betweed JInternalFrames?

+Pie Number of slices to send: Send
Hello,
I would like to use JInternalFrame to build an MDI application,
but I don't get the expected behaviour. Shouldn't the activated
internalframe change if I press control and tab?

Regards,
Felix

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;

public class MDITest
extends JFrame {
public MDITest() {
super("MDITEST");
setSize(600, 400);
JDesktopPane m_desktop = new JDesktopPane();
getContentPane().add(m_desktop, BorderLayout.CENTER);
JInternalFrame frame = new JInternalFrame();
m_desktop.add(frame);
frame.getContentPane().add( new JButton( "Button"));
frame.setBounds(100,100, 100, 100);
frame.show();
frame = new JInternalFrame();
frame.setBounds(0,0,100,100);
frame.getContentPane().add( new JButton( "Button"));
m_desktop.add(frame);
frame.show();
}

public static void main(String argv[]) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch ( Throwable th) {
th.printStackTrace();
}
MDITest frame = new MDITest();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
+Pie Number of slices to send: Send
Ok, I just found out, that I can use Ctrl-F6
to switch between the frames.
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1647 times.
Similar Threads
Swing Jdesktop pane
loading frame/internalframe inside an internalframe
How a JInternalFrame show on Button Click
JInternalFrame
y i cannot create a MDI???
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 02:59:24.