So the question is: Can native-styled windows with borders only be created using Swing?
Shortly: No. Unfortunately it is impossible to do this using Swing.
Also: Same "No" goes for the tool windows which can also be created using SWT.
Now let me explain why.
Swing uses pure-Java written rendering to paint any components and custom decorations within your application. Window decoration in Swing is a bit different topic though - by default JFrame and JDialog are decorated using native style - basically when window instance is created in your system from Java application - that window is asked to have default decoration for either frame or dialog (plus some other possible options). After that this window is used to render Swing components on it. But Swing code has no real control over the system-provided decoration, it can only switch it on/off and configure a few options in it. Unfortunately the option you are looking for is not there - most probably wasn't not implemented as not very popular one.
Though Swing allows custom component/window styling through custom L&F (Look and Feel). L&F which supports custom window decorations simply provides its own way to paint and control window decoration. In case such L&F is installed - Swing uses undecorated frames/dialogs by default and simply asks L&F to do the decoration. Anyone can write their own L&F which means anyone can create custom decorations.
So as @camickr mentioned before you have only one option if you want to create such frame (like on the screenshot in your post) in Swing - use either JDialog/JFrame with setUndecorated
set to true or JWindow which is undecorated by default and "paint your way through". Graphics2D provided for all painting operations will allow you to create any custom decoration of your window, even the one on your screenshot.
I won't lie - creating custom window decoration is pretty difficult - it requires a lot of knowledge in Swing and large amount of written code, not only painting code. So I really doubt you will choose that option unless you are passionate about UI creation.
In the end - you have to choose between SWT and Swing (or even JavaFX) as each of these UI frameworks offer totally different sets of features and options. Window decoration is just a tip of the large iceberg.
EDIT:
Since JDK 7 it is actually prossible to create tool windows, all you need is to set your window type to Window.Type.UTILITY
. Though it is still not possible to create a window with native borders only without any title bar.
just need to know what type of swing component can emulate the same look
- theBorder
API as has already been suggested. There is no LAF Border you can just plug in, you need to write your own if you don't like the standard Borders of the JDK. – Ezarras