0

I have two classes ClassFrame and ClassPanel, now my ClassPanel extends JPanel and similarly by name ClassJFrame extends JFrame,

http://postimg.org/image/qpfgz8fpv/

Conditions with JFrame

  1. It already have other components like jinternalframe, jmenubar, toolbar, etc.
  2. I have to add and show ClassPanel in between of jframe
  3. ClassPanel always show above of other components

Conditions with JPanel

  1. I have add interfaces like Key, Mouse & MouseMotion Listeners,
  2. So I can move the jpanel & set visibility false by making mousepress on top right specific area

Moreover my image can illustrate what is my requirement, but now I don't know how to add panel with frame and move within it and show above of other components.

Kindly throw some light on this, thanks in advance.

Community
  • 1
  • 1
ArifMustafa
  • 4,617
  • 5
  • 40
  • 48

1 Answers1

1

I think you should use JLayeredPane to get the required output. Here is the tutorial about that:

http://docs.oracle.com/javase/tutorial/uiswing/components/layeredpane.html

Ram Krishna
  • 130
  • 7