How to disable Netbeans highlighting?

Using Netbeans and Java Swing?

  • I consider myself to be a pretty good coder and with solid Java skills, however, I do not have much experience using Swing. That is why I am using the GUI builder in Netbeans to do this for me. So far, my experience with the GUI builder in Netbeans has been a little rocky, but I'm pretty much used to it now. Let's say I have a JPanel and depending on where the user is in the workflow process, I need to change the contents of this JPanel. For example, the default screen is a summary page, which consists of a list of Portfolios on the left and a list of Investments on the right. On the left side, each Portfolio is listed like Portfolio #1, Portfolio #2 and beside each one is an Edit button. For one thing, I don't know how to dynamically add these Portfolios and Edit links for each existing Portfolio object and also, I don't know how to make the JPanel contents change when the user clicks on Edit. Clicking on Edit should bring them to a Project entry screen. Is this all possible to do in Netbeans? Here's what I tried initially... I created each of the different screens and put them in the Other Components folder. Then, depending on the action, I set changingPanel to one of the other JPanels I already designed, but when you do something like: changingPanel = someOtherPanel all you're doing is switching the pointer. There are no copy methods, nada. So then my other idea was to create a long scroll pane. One that has each of the panels next to each other. And depending on what the user clicks, I can just move the ViewPort over to some known Point, but I never finished that idea, because there has to be a good way to do all this, right???

  • Answer:

    I don't use that Matise Gui builder because it puts in code u can't touch. I suppose it would be okay for static panels, eg, a currency convertor. Fantastic applications getting made using NetBeans as a frame and they subtract what they don't want in the final application. However, I like the code window with the linking to javadoc. NetBeans shows me scope, which is vital when I'm chaining the GUI or logic. It took me about 2 years to master the JFC. The "textbook" style of coding works best. If you want to swap JPanels, use JTabbedPane or CardLayout. You see, you have to reach into the JFC to get to the layout, then setLayout, then add and possibly validate(); and, when JavaFX crosses over to Linux, that will be how I do animated Swing Gui. As it is now, I get pretty good results using the graphic commands of Graphics2D to draw any widget I want (but man, I had to remember all the 1st year college math all over again to draw a stinking hexagon).

jpildave at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.