Results 1 to 6 of 6
  1. #1
    fatabass is offline Senior Member
    Join Date
    Nov 2011
    Location
    Turkey
    Posts
    380
    Blog Entries
    24
    Rep Power
    3

    Default Can I make the JFrame's top part invisible?

    Can I make the JFrame's top part invisible?-01.png

    Can I make the part that says ( "Learning Menu" ) invisible ?

    I only want it to show the MenuBar and the rest.

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    5

    Default Re: Can I make the JFrame's top part invisible?

    setUndecorated(true)
    or
    JWindow instead of JFrame
    But you must realize that you can not drag and drop the frame then...you have to add listeners for that

  3. #3
    fatabass is offline Senior Member
    Join Date
    Nov 2011
    Location
    Turkey
    Posts
    380
    Blog Entries
    24
    Rep Power
    3

    Default Re: Can I make the JFrame's top part invisible?

    Thanks a lot.

    Shall I add the listener to the JMenuBar ? And could you please tell me what kind of a listener would I need ?

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: Can I make the JFrame's top part invisible?

    MouseMotionListener#mouseDragged added to whatever you want to respond to it.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    fatabass is offline Senior Member
    Join Date
    Nov 2011
    Location
    Turkey
    Posts
    380
    Blog Entries
    24
    Rep Power
    3

    Default Re: Can I make the JFrame's top part invisible?

    Thank you.

    I will work on these today.

    The window looks much better with setUndecorated(true).

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: Can I make the JFrame's top part invisible?

    You also have setDefaultLookAndFeelDecorated(true) -- static method, to be run before constructing the JFrame.

    As eRaaaa hinted, JWindow is undecorated by default.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. How To Make JFrame Invisible And Contents Visible?
    By Kuttappu in forum Advanced Java
    Replies: 3
    Last Post: 01-06-2012, 06:52 AM
  2. How to make image invisible and visible in applet
    By KSBeyaz in forum Java Applets
    Replies: 15
    Last Post: 12-04-2011, 05:58 PM
  3. Replies: 2
    Last Post: 02-23-2011, 05:14 PM
  4. Replies: 4
    Last Post: 04-22-2009, 11:02 PM
  5. How to make the JTextArea background invisible
    By bradder in forum AWT / Swing
    Replies: 1
    Last Post: 12-05-2007, 06:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •