Frame without TitleBar

Hai JAVA guys,

Can we create A frame(either it is AWT or Swing)without title bar or such type of window without title bar.thanks in advance.

Basha
shaikchanbashaAsked:
Who is Participating?
 
sey7Connect With a Mentor Commented:
Hello,

You have two examples here:

--------------AWT------------

import java.awt.*;
public class WindowEx extends Window {
  public WindowEx() {

    super(new Frame());
    Label    l = new Label("JWindow");
    add(l);
    setBounds(100, 100, 300, 300);
    setVisible(true);
  }
  public static void main(String[] args) {
       WindowEx w = new WindowEx();
  }
}




------------Swing--------------


import javax.swing.*;
public class JWindowEx extends JWindow {
  public JWindowEx() {

    super();
    JLabel    l = new JLabel("JWindow");
    getContentPane().add(l);
    setBounds(100, 100, 300, 300);
    setVisible(true);
  }
  public static void main(String[] args) {
       JWindowEx w = new JWindowEx();
  }
}


Best Regards,

            sey.
0
 
shekoffCommented:
Try to use Window class !
The window not contain a tittle bar !
Regards
0
 
shaikchanbashaAuthor Commented:
Hai sey7 thank you for ur help.

Basha
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.