Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By RichersooN

Thread: Undecorated JFrame background shadow

  1. #1
    md_suzon is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Undecorated JFrame background shadow

    Hi,

    I used a undecorated Jframe in my Java project. But I can not create background shadow of that Jframe.
    Can any one help me how to create the background shadow undecorated Jframe ?

  2. #2
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Re: Undecorated JFrame background shadow

    Quote Originally Posted by md_suzon View Post
    Hi,

    I used a undecorated Jframe in my Java project. But I can not create background shadow of that Jframe.
    Can any one help me how to create the background shadow undecorated Jframe ?
    What do you mean by background shadow undecorated Jframe ?
    md_suzon likes this.

  3. #3
    md_suzon is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Re: Undecorated JFrame background shadow

    Well...
    In attachment I added 2 Jframe...
    1. a Decorated Jframe with shadow
    2. a undecorated Jframe
    Undecorated JFrame background shadow-undecorated-false-.jpgUndecorated JFrame background shadow-undecorated-true-.png
    Please see this 2 image then you easily realize that ....
    Thanks

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default Re: Undecorated JFrame background shadow

    That would be the Border of the JFrame. The Border is different for the platform that you are using.

    Read up on How to Use Borders (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components). You might be able to use an existing Border or if you wn the full effect of the shadow you will likely need to implement your own custom Border.

    Does a JInternalFrame have a Border like that? If so then maybe you can use:

    Java Code:
    Border border = UIManagerDefaults.getBorder("InternalFrame.border");

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,690
    Rep Power
    8

    Default Re: Undecorated JFrame background shadow

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    md_suzon is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Re: Undecorated JFrame background shadow

    Thanks camickr !!
    I use the Jframe Border ... but that's not like the shadow !
    is there any way to create background shadow what could be shows like Decorated Jframe ?

  7. #7
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Re: Undecorated JFrame background shadow

    to add jpanel in jframe then expand the jpanel's size to the size of jframe that the shadow can't be seen.

Similar Threads

  1. JFrame background help?
    By Bimz in forum New To Java
    Replies: 4
    Last Post: 08-20-2011, 07:39 AM
  2. JFrame image background
    By 851marc in forum NetBeans
    Replies: 5
    Last Post: 03-09-2010, 06:27 PM
  3. How to add a background image to JFrame
    By dunafrothint in forum AWT / Swing
    Replies: 1
    Last Post: 02-26-2010, 10:17 PM
  4. Need help with JFrame background image
    By ProGenius in forum New To Java
    Replies: 6
    Last Post: 12-27-2009, 04:17 PM
  5. Background in JFrame ( GUI).
    By Twister03 in forum AWT / Swing
    Replies: 2
    Last Post: 03-12-2009, 03:24 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
  •