Eclipse icons below jmenubar - java

The tiny icons eclipse displays below its JMenuBar, what are those? How would one go about creating them? Are they part of the JMenuBar? Are they seperate from the JMenuBar?

I don't use Eclipse but from some images I've seen it looks to me like they are buttons on a JToolBar.
See the section from the Swing tutorial on How to Use Tool Bars for more information and examples.

Related

NetBeans Change Scroll Bar Design

I have a question regarding JScrollPane.
I am making a java app in NetBeans with swing and I am using few Jlists. Two of them, have many items and a scrollbar appears to the right side.
When I edit the app the scrollbar looks the way I want, however when I run the app the design changes. The image in the link below shows what I mean.
How can I use the scrollbar design of netbeans look when I run the app?
scrollbar image
Thank you in advance!
You need to set a look and feel.
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

Alternative to JCheckboxMenuItem

As I'm (re)building a GUI in Java, I see some things in Java Swing are not so pretty, or the options are not as rich as in some other GUI frameworks.
So in the old GUI, this is what we see
Now when I try to remake this with Swing, this is my best guess:
My question: is there a more elegant and neat way to make a toggle work in a menu, while also using an icon in Swift? I don't want a checkbox and an icon, I want an icon instead of a checkbox, at the place of the checkbox. As can be seen in the old GUI picture.

Java: Buttons and Labes Layout

What way would you suggest to layout (locate) Jbuttons and Jlabes in java in the fashion depicted in the picture below? Is there any tool for visually being able to place the components on a form in Java, rather than specifying the component locations in the code one by one.
Thanks
I am using eclipse
You can use Swing GUI Builder for visually layout component.
For Eclipse you can use WindowBuilder. Look for Installation guide with update site of eclipse. Also take a look at the Tutorial.
Yes, NetBeans comes with a visual UI builder for Swing.
Use NetBeans, its have a create GUI tool!

Create a Visual Studio type look using Java Swing

I would like to create extend a Java Swing application to have a look somewhat similar to an IDE such as Eclipse or Visual Studio. That’s, there would be a panel at the left that displays a tree, and a tab panel on the right that allows several elements of the tree to be opened and edited on right. For this I could easily use a BorderLayout and just use the center and left areas.
However, I would also like to have the ability for the user to drag the border between these two panels, just like Eclipse and Visual Studio allow. I can think of several ways to do this, but was curious if anyone had found a particularly good way to do this, or knew of an example. I’ve googled for it, but have not found anything.
You could use JSplitPane. And maybe have a look at an article about a MultiSplitPane.
While JSplitPane does exactly what you asked for, you might also be interested in JToolBar, which does other Eclipse-like things such as attach/detach and drag a panel of tools around the UI.

Open-source improvements or replacements for Swing components

I develop a number of desktop Java applications using Swing, and while Swing is quite powerful (once you get the hang of it), there are still a lot of cases where I wish some advanced component was available right out of the box.
For example, I'd really like to see easy-to-use components (without writing them myself, which I could do given enough time) like:
Multi-line label
Windows File Explorer-like Icons or Thumbnails view
Drop-down button (like Firefox's old Back button)
5-star rating widget
Combo box with automatic history (like the text field on Google)
An Outlook-style accordion-style bar
and so on
I know of a couple of sources of free Swing components, like SwingLabs, home of JXTable, JXDatePicker, and a few others.
Where do you go for Swing components beyond those included with Java itself?
The following are worth a look:
swingX
Glazed lists
Substance look'n'feel
Flamingo components
Ken Orr's Mac Widgets
Jide's open source components
As for: "Windows File Explorer-like Icons or Thumbnails view"
They are built in in swing.
File explorer icons are accessed through FileSystemView class ( it is used by JFileChooser ) when the L&F is Windows of course.
FileSystemView.getFileSystemView();
Icon driveIcon = fsv.getSystemIcon( new File("C:\\"));
And the Thumbnails icon can be retrieved with the sun.com class that are discouraged by Sun
sun.awt.shell.ShellFolder getIcon( boolean largeIcon )
But this one may not perform very well some times ( due to native resources handling I think ).
I know you can get an awesome wrapping labe and an accordion from javaswingcomponents, however they are not open source implementations.
Otherwise Jide and SwingX are great choices.

Categories