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);
}
}