A customized dialog box
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)
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);
Directly you cannot do this with Java in easy steps. But with all the graphic classes, yes you can, specially with 2D.
Is it a web based application?
No its a desktop application
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
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?
Originally Posted by 67726e
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.
I'm not sure that you can have exactly the same theme. But the icon and stuff could be handle. All dialogs inherit the icon from the parent JFrame, hence you can control is.
See how can customize it.
How to Make Dialogs (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)