Results 1 to 10 of 10
  1. #1
    radhi is offline Member
    Join Date
    Sep 2010
    Posts
    10
    Rep Power
    0

    Default A customized dialog box

    Hi All,

    I am new to this swing...

    Can you provide me the code to create a custom dialog box..
    This dialog will not have close window (cross) button in title bar and java cafe icon should be there.
    Please look in to the attached image ..i need exactly like that..


    Please find the attachement img.jpg (this is i created .. but i need like sample.jpg)
    Regards
    Radhika
    Attached Thumbnails Attached Thumbnails A customized dialog box-sample.jpg   A customized dialog box-img.jpg  
    Last edited by radhi; 09-24-2010 at 01:00 PM.

  2. #2
    67726e is offline Member
    Join Date
    Mar 2010
    Location
    Hilton Head, SC
    Posts
    34
    Rep Power
    0

    Default

    Basically, you will have to use images to create a lot of that. The button and the icon will need to be. To get rid of the Frame, you can use setUndecorated(true);

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Directly you cannot do this with Java in easy steps. But with all the graphic classes, yes you can, specially with 2D.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  5. #5
    radhi is offline Member
    Join Date
    Sep 2010
    Posts
    10
    Rep Power
    0

    Default

    No its a desktop application

  6. #6
    radhi is offline Member
    Join Date
    Sep 2010
    Posts
    10
    Rep Power
    0

    Default

    I have done that..
    But the problem i am facing is
    1) Removing an cross closs button in title bar
    2)change the look of title bar

  7. #7
    67726e is offline Member
    Join Date
    Mar 2010
    Location
    Hilton Head, SC
    Posts
    34
    Rep Power
    0

    Default

    A solution to remove the frame by setting 'setUndecorated(true)' for the JFrame, then creating your own title bar at the top of the container.

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by 67726e View Post
    A solution to remove the frame by setting 'setUndecorated(true)' for the JFrame, then creating your own title bar at the top of the container.
    @OP, did you try this?

  9. #9
    radhi is offline Member
    Join Date
    Sep 2010
    Posts
    10
    Rep Power
    0

    Default

    Hi ,

    I have given setUndecorated(true) .. so it wil undecorate the default title bar ..
    Please can u provide me how to create the title bar over there.

    Thanks

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Create customized ColorChooser
    By LianaN in forum AWT / Swing
    Replies: 1
    Last Post: 08-26-2010, 09:24 PM
  2. dialog box
    By blindfolded916 in forum New To Java
    Replies: 5
    Last Post: 07-11-2010, 12:44 AM
  3. Dialog
    By JavaLerner in forum AWT / Swing
    Replies: 27
    Last Post: 07-07-2008, 12:29 PM
  4. How to create a customized layout manager
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-26-2008, 08:41 PM
  5. Example of SWT Dialog
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-09-2008, 01:01 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
  •