getting rid of window buttons


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: getting rid of window buttons

  1. #1
    Join Date
    Aug 2005
    Posts
    41

    Exclamation getting rid of window buttons

    Hi

    I need to find out how to get rid of or diable the little minimize, maximize and close buttons that are in the top right hand corner of the window. Do anyone know how?


  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    I have only seen that done for JInternalFrame, but then again, I haven't seen all. And,
    just for the record, I have never seen Window applications that deny me the right to
    do those things.
    eschew obfuscation

  3. #3
    Join Date
    Aug 2005
    Posts
    43
    JWindow does that, but it is not recommended...there are a few tweaks you can do with a JFrame that removes the title bar, setDecorated*something method i think....if that doesn't work, try the sun java forum, i remember seeing that same question answered a while ago.

  4. #4
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560

    Right, the JWindow...

    ...I have never used it until today. However, I failed to find any "warnings"
    on its use, this is what the sun doc says:

    A JWindow is a container that can be displayed anywhere on the user's desktop. It does not have the title bar, window-management buttons, or other trimmings associated with a JFrame, but it is still a "first-class citizen" of the user's desktop, and can exist anywhere on it.
    To switch from a JFrame to a JWindow is easy though:

    Code:
    public static void main(String[] args) {
        MyJFrame f=new MyJFrame("No Frame");
        JWindow w=new JWindow();
        //f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //f.setBounds(20,20,400,200);
        //f.setVisible(true);
        w.setContentPane(f.getContentPane());
        w.setBounds(20,20,400,200);
        w.setVisible(true);
      }
    Hmm.., better add a close/exit button somewhere...
    eschew obfuscation

Similar Threads

  1. How to get rid of the password window?
    By Dan-Yeung in forum Enterprise
    Replies: 1
    Last Post: 11-05-2001, 12:39 PM
  2. Replies: 0
    Last Post: 06-13-2001, 09:23 AM
  3. Replies: 0
    Last Post: 05-30-2001, 06:11 AM
  4. child window - is it or isn't it?
    By TC in forum VB Classic
    Replies: 8
    Last Post: 09-26-2000, 02:34 AM
  5. child window - is it or isn't it?
    By TC in forum VB Classic
    Replies: 0
    Last Post: 09-25-2000, 09:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center