Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using Ctrl-Tab to change betweed JInternalFrames?  RSS feed

 
Felix Schudel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
}
}
 
Felix Schudel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I just found out, that I can use Ctrl-F6
to switch between the frames.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!