I want to create a menu with tabs which displays some options like the palette used by Window Builder of Eclipse when I click in a tab.
I need something similar to this:
I guess swing has no element like this. But you could take a look at the Standard Widget Toolkit (SWT) which is maintained by the Eclipse Foundation. It includes a widget called ExpandBar, which is probably what you are searching for. Documentation and API found
here.
Related
Right now I am working on a GUI application In java using the GUI builder that comes with NetBeans.
However I have found some kind of strange bug/feature, as I am no longer able to see the window that allows users to change between "source" and "design" (Design is the drag and drop NetBeans gui builder while source is the code where you can add your own methods and so forth).
NOTE: the red is censored information that is not necessary.
When I right click on a component to add event code, then it takes me to the source (without a window for me to change back to design, it goes back to design when i close and reopen it). So I know that NetBeans recognizes that this is indeed a JFrame form with the NetBeans GUI designer, and the source code is indeed availible..
I could not find any answers to this question on this site or on the web, I have tried resetting the windows but it did not work, I also couldn't find the window when I clicked on the window option. I am sure there is some easy question but I am unable to find it. Please forgive me if this was an easy question.
On the menu bar, try clicking View -> Show Editor Toolbar
I have to develop a simple breadcrumb control using SWT which shows hierarchy of the system folders opened so far in a bar at the top and all the folders present at the current location in a window below. Folders should be hyper linked so one can click to move into them further. From where should I start?
As for the visual part, you can use the Breadcrumb widget from the Opal project.
It looks like this:
To handle selection, just add a SelectionListener to each of the BreadcrumbItems.
Note that this is not a "hire a programmer" page, so don't expect complete solutions to your problem. If you have specific questions, we are more than happy to try to answer them :)
i like the style of netbeans palette (Window -> Palette, best seen when creating a gui). i would like to integrate a similar collapsable panel in my application, but i have no idea how to find this component. i guess its not a standard swing component, although it looks kind of similar to a jTree. i poked arround the netbeans framework, but i couldnt find the corresponding class.
I know about swingx's JXTaskPane, but i would really prefer an easy, clean way to hide, show and group ui components, without fancy-animation bloating my app needlessly. The netbeans palette seems just perfect. but how is it called & where can i find it?
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!
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.