posted 12 years ago
I am struggling with a bit of inherited code that needs sliders added. I have not gotten that to work. I thought the best thing to do was make an example that had the basic layout of the problem application (with sliders) and then try to plug all the inherited bits into it. Here is what I wrote. It works. In the 'real' code I have to use an 'ApplicationFrame' pulled from a jar, not a JFrame, and set a value in an object created from another non-standard class from the same jar. But before I worry about those details, are my inner classes in the right place? I wasn't sure if they should be inside the main ScrollTestTrouble class or in the MainPanel class. Same issue regarding xLabel and yLabel. Should they be defined in the MainPanel class or are they fine where they are? Either way works, I assume one is better. I want to get this bit right first before I worry about things like resetting the position of the thumbs when the image in the ApplicationFrame is redrawn (you can select a piece of the image the scrollbars are operating on in the actual application).