Unable to drag items from palette in window builder - java

I've recently installed window builder plug-in on my Eclipse IDE. When I create a New project and add window builder or anything, I'm unable to drag even a button from the palette.I might be dragging it the wrong way or there might have been something missing in the path etc. Does anyone know the solution to it? It'll be highly appreciated. Thanks!

What do you mean by "I'm unable to drag even a button from the palette" - is the palette not responsible to mouse events?
Try creating File->New->Other and selecting Window Builder->Swing Designer->Application Window. Switch to Design tab.
Basically you don't drag components/layouts to the graphical view of your window. You should select for example JButton by clicking it first. Afterwards you click (second time) on the window.

Related

JInternalFrame Issue

I could not use JInternalFrameForm in Netbeans.
I did right click on my package and go new but I did not see JInternalFrameForm option.
The right click New menu only shows you options you have commonly used, or only several default options if you haven't used any.
to find JInternalFrameFrom, select the Other Option on the bottom of the options,
Then type in JInternalFrame in the search box of manually find the component inside the Swing GUI Form folder.
see the image below

NetBeans GUI designer window to change between design and source not showing

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

Netbeans add popup menu with visual editor

I need to add a popup menu to the JFrame, but when I drop that component there it just dissappears. I can see it in code, but there is no way to edit anything about it. Is there a way I can edit it like say menu bar?
I use Netbeans 7.2.1 if that is important.
PS - Yes, I tried googling and found only this, but it is not helping...
Okay, I figured it out by myself.
Open Windows -> Navigation -> Navigator it will show a navigator window with all components currently on jFrame.
In that navigator window then click Other components.
In there all non visual components including jPopopMenu will be listed.
By clicking on any of these components it is possible to edit their properties.
Editing the popup menu visually is possible by double clicking on it. It will then bring up visual menu builder.

How to Resize a window so that all components are visible

First off I am using Intellij IDEA's GUI tool.
I have a window that has a browse button, if the user clicks the browse button they can explore their computer for an image file. If they choose an Image file then the window will add that image to the screen next to the previous image, If the window just barely shows all the images and the user adds another one, I want the window to expand to be able to show the new image.
Does Java Swing have this capability? If so, how should I go about implementing it?
If you are using appropriate layout managers, you can simple call Window#pack.
You should also consider checking out How to use scroll panes, cause I have some very large images...
The other thing you can look at is the Scrollable interface

SWT Tray Icon Popup

I'm playing with a Tray and TrayItem in SWT, and i was wondering if there was a way of getting the location on screen of the icon. I want to be able to position another shell just underneath it as if it were a popup.
Basicaly just having a mare trying to find the dimensions and location of it....
Any ideas?
Cheers
Andy
Why would you need this?
If the trigger for displaying the pop-up is a mouse click, you can use the Event object of the listener to get the co-ordinates.
If not, I don't think its a good idea to do this. Mainly because you never know whether a tray icon will be visible or not (in Windows 7 for example). If you are using Gnome, you can use libNotify, which is a much better choice for pop-ups.

Categories