Help with developing a JPanel Form with Netbeans 8.2


I have used the site: to develop a working JPanel years ago, but I can no longer get it to work. I followed the directions as best as I could, but they no longer correspond to the Netbeans 8.2 platform. I managed to get the debug to open an instance of ImageJ, and my plugin shows up in the plugins menu, but nothing happens when I click it. I can get the JPanel to show up if I run the java file, but not if I set it as the main project and try to run the main project. Also, I cannot get it to run in ImageJ using the generated jar file. I admit to being a novice at git and Netbeans, but I can’t seem to find help to get me more advanced. Anyone willing to help me?


My real problem is in not being able to open my JPanel. I was able to clean up the pom.xml file, even though I do not understand the dependency structure, by simply selecting all the text in the file, deleting it, then clicking on the little red triangle and restoring the original text.

Still, even though the build is clean and the program runs without any errors, the GUI (JPanel) never shows up — the program starts, then stops in less than a second. The JPanel never appears. There are no errors anywhere. I tried a new project in an earlier version of Netbeans, just so there would be no interference from my other project; it was simply a JPanel with a single button, but running it gave the same result: the project starts and stops within a second and the JPanel never appears. This is my problem, not the pom.xml file or the plugins.config file. The JPanel never appears and when I allow an instance of ImageJ, the plugin never appears in the plugins dropdown menu, even though it has an underscore in the name. I think I am missing something very basic, but I can’t find it! :frowning:


Thanks to all who answered! The issue has been resolved by Curtis Reuden: I just needed a JFrame, where I had only a JPanel. Now it works! Live and learn! :slight_smile: