Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: JInternalFrame close button shrunk on windows 7 with classic look and feel ???

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JInternalFrame close button shrunk on windows 7 with classic look and feel ???

    Hello all... Currently my swing application runs in Windows XP. I need to support my application on Windows 7 and this is where the problem begins. I got few problems like color discrepancies. When i changed the look and feel of the system to classic laf through code, the color discrpancies were gone but the close(cross mark at right top corner) button of the JInternalFrame was shrunk. I mean only half of the cross symbol was showing thus like a "V" symbol.

    I "almost" got the classic look except for badly looking JInternalFrame icons and a standard issue of components at the corners of the screen appearing shrunk in all the screens of the application.

    The code which changed the laf is as follows.

    UIManager.setLookAndFeel("com.sun.java.swing.plaf. windows.WindowsClassicLookAndFeel");

    This caused the JinternalFrame close button problem. I am using Java 1.6.0_16.

    Can any body faced this kind of problem ? Please help me on this. Thanks in Advance.


  2. #2
    Junior Member
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JInternalFrame close button shrunk on windows 7 with classic look and feel ???

    Hi pandu_204,
    the problem is caused by the titleButtonWidth property. This is set at 35 by default which is too large for the 'classic' icon images.
    To fix it you can make the width smaller. Add the following line after you set the look and feel.

    UIManager.put("InternalFrame.titleButtonWidth", 20);

    Regards
    Thomas

Similar Threads

  1. Look & Feel
    By Asido in forum AWT / Java Swing
    Replies: 3
    Last Post: September 10th, 2010, 10:13 PM
  2. [SOLVED] How to reload JInternalFrame
    By chyrl in forum AWT / Java Swing
    Replies: 7
    Last Post: April 6th, 2010, 07:31 AM
  3. close JDialog on button click
    By Christophe in forum AWT / Java Swing
    Replies: 4
    Last Post: April 5th, 2010, 12:04 AM
  4. Replies: 2
    Last Post: October 14th, 2009, 11:10 AM
  5. Replies: 5
    Last Post: April 20th, 2009, 07:47 AM

Tags for this Thread