I've just migrated from Eclipse to JetBrains IntelliJ IDEA and I find it very annoying when it comes to using designer. When I create a new GUI form the designer works fine for some time. Then suddenly after switching to other class or after closing and reopening IntelliJ it shows me XML code only and I have no option to switch to designer mode. This time I have form with three buttons and IntelliJ shows me XML with three notifications at the top "missing mnemonic: name_of_a_button" despite that I didn't use any and never wanted to. By the way even if it works fine I don't have that switch at the bottom to toggle between designer and text mode. Why is that?
We have two options:
(1) Disabling this particular inspection by clicking the icon at the right of the message;
(2) Going to the button's Component Properties panel, "Text" property,clicking on the lamp icon and providing a mnemonic for the text. (image berllow)
Related
I am currently completely stuck with the following problem: I want an GUI with a cotrol panel at the right to type in some program parameters that should be used to draw multiple lines onto a graphic panel at the left side of my GUI. My approach was to use the Form Designer to arrange the Layout with all the Buttons, Lables and TextFields. Than I created a Class "GraphicPanel" that extends JPanel and I overrided the PaintComponent method of this class in order to draw the lines.
Now I want to add this custom created component via the form Designer to my UI. But when I try this via the Non-Palette-Component option: nothing happens and the component is not even shown in the hierarchy-tree. I have already serached the web for solutions and found that my class needs to be compiled and the ReloadCustomComponents-Button must be clicked after inserting custom stuff. My class is compiled but the ReloadCustomComponents-Button is not shown up in the UI-Designer Toolbar. I tried to configure the toolbar manually - and in the configuration setup Intellij is also listing the Button as a displayed icon - but it is not there when I apply the configuration. Did anyone had the same problem or does anyone have any suggestions what I can try or what else I can check out? I am actually wondering if this is a software bug or whether I missed something different. I am quite a beginner and especially working with UI's and Swing is new for me so I have no real idea how to go on with this. Thanks for any help!
(I am using Intellij Idea 2020.3.1 on Windows and JDK 15.0.1 and my output format for the UI-form code is set to binary class files)
UI component classes used in the UI Designer palette must be compiled for the same or lower Java target version as is used to run IntelliJ IDEA. IDE JDK version is available in Help | About dialog and is 11 for 2020.x IDE versions.
Change the target JDK version to 11 so that IDE can load the component classes. See this answer for the relevant places where JDK language levels are configured.
I'm using Eclipse 4.2 (Juno) for Java EE and just installed WindowBuilder plug-n. At this time I'm building Java SE Application with Swing components.
The Palette is completely empty (no widgets). Is it a sign of incomplete installation or have I (hopefully) missed something obvious?
I was able to select New -> Other -> WindowBuilder -> Swing Designer -> JPanel.
Not even sure what other information I need to provide.
Thank you in advance for your help.
EDIT:
I installed via Help -> Install new software Followed these instructions.
What throws me off is that in Eclipse Community Forum I found a post which answering a similar question states: "What you are seeing is the expected behaviour. Until you actually edit a UI class using WindowBuilder, those views will be empty.". I do not know how to interpret it.
UPDATE: Problem solved
When I created a new JFrame via Create new visual classes icon I finally got Design view as well as Palette full of components and normal Structure view.
The Palette view in Eclipse is tied to the currently active Editor. So if you don't have an Editor or you have selected and focused on the Palette view, it will be empty. So leave the palette view open, then create a JFrame java class. Then right-click the Java Class and make sure you are opening it in the WindowBuilder editor. Once the WindowBuilder visual editor is open, and you also have the Palette open, you should see the wigets populated there.
Check if pallet is open in view pannel (parallel to console, progress and all), if it is open close that, then pannel will appear automatically in windowsBuilder tool.
I recently tried to open a JPanel form that I created with NetBeans GUI Builder and NetBeans almost freezes up on me. The design form is an all-gray background, not the usual gray area where I can place components surrounded by a white background. If I click on the Source button and then switch back to Design view, all of the tabs in the editor pane disappear.
Fortunately I am using Git for version control. The last commit of this file was over a week ago. I might have to revert to an earlier version to see where this problem was introduced. In the mean time, does anyone have any idea what could cause this behavior? Is it possible that my .form file is corrupted? The application compiles and runs just fine.
It sounds like Netbeans can't load the form due to some internal error. This can sometimes be fixed by doing a clean & build to clear out any old cached data.
If that doesn't work, you can check out the "message.log" for the error...and yes, I wish it would display it on the screen
Off memory it use to be in "{user.profile}/.Netbeans/{version}/var/log" (I think). It got moved on Windows under 7.2 to "{user.profile}\AppData\Roaming\NetBeans\7.2\var\log"
I am writing a simple registration form in html using Eclipse Indigo.But after running one time on server Apache Tomcat 6.0 ,it is giving perfect output.But later if i am trying to modify any value in html form then it is not updating in resulting browser output
Press "Republish" button on the "Servers" view in your Eclipse window.
I report a similar fact and its solution: fantasy names for files. Eclipse Neon. I create: Red.html with code for a red button and Green.html with code for a green button. I choose Google browser from Eclipse ide and display correctly both html. Then I destroy, from Eclipse ide, Red.html and rename Green.html to Red.html. I launch the renamed Red.html and I see a red button instead than a green one. I open Google settings, and cancel navigation data from the last hour. Now Red.html displays green button. I've done so, because Internet Explorer, not involved in previous manouvres works right: present Red.html displays green button. I haven't tried the ide way as in the previous answer, as I'm new to Eclipse. I tried the browser side with caution: only 1 hour of navigation.
I made a GUI in Eclipse using the Google WindowBuilder plugin. The problem is that when I right-click on the design representation of my code and click, "Test/Preview," my GUI works and looks perfectly (the picture on the right), but when I click the "run" button in Eclipse to actually run the code, the GUI looks all weird (the picture on the left).
Does anybody have a clue as to what the problem is?
Ok this could have multiple reasons, the most obvious one being, that you (accidentally?) set your JButtons' background Color to the same dark-gray as your Frame's background. Check This first! WindowBuilder's preview has a quirk of sometimes not showing recent design changes on some elements immediately.
If that Is not the case with you, it might be some weird formatting thing.
Have you manually changed your buttons' formatting within the code and not within the design tab? Then add (Say your button is called okButton) okButton.repaint(); after the changes you manually made.
If this still doesnt work,
Try adding okButton.setVisible(true); (Althought that is pretty far fetched, seeing that a button outline can be seen!)