Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Strange Border behaviour

 
nick woodward
Ranch Hand
Posts: 370
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just experience something quite strange that I'd be quite interested to understand....

I'd previously made a very simple set up - a JFrame with two JPanels, one a text area, the other a toolbar.

In my JFrame I'd created a method to add a border, passing the toolbar. It worked fine.

Anyway, the method was removed hours ago, as was any reference to this border. I'm 100% sure of this as I've saved and compiled numerous times since, with a whole range of changes taking effect on each of the relevant components. But despite this I eventually noticed that the border was still there!

I thought I was going nuts, leading me to check very little code for a very obvious 'Color.RED', or reference to the border class. I eventually just commented out the Toolbar JPanel, and the code adding it to the JFrame. The panel disappeared. I uncommented the aforementioned changes and the Border had gone.

Is there some sort of cache that I'm not aware of? Or am I just losing it?

I'm so confused

Regards,

Nick

 
Campbell Ritchie
Marshal
Posts: 52621
119
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Please start by going through your directory and looking at the creation date of any .class files. If that doesn't explain things please post the before and after versions of your code.
 
Les Morgan
Rancher
Posts: 717
17
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like to blame this on the Windows Black Hole effect, but in reality I've had the same problem and I had moved some class files to a different folder and forgot them, but included them in the build. So first they were the persistent objects that always showed up, then when I realized what was going on I quit freaking out until after I long forgot about them and changed the build, then they were the files that just would not come back. Alas, I have learned a few things along the way in the school of hard knocks.
 
nick woodward
Ranch Hand
Posts: 370
11
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it's just one of those things...... just thought I'd ask incase there was some sort of obvious answer.

Thanks for the offer of help Campbell, but it isn't all that important, I just found it very odd. I literally went 'back' (I'm using TextPad to edit and save, Cmd to compile and run) to the previous version of code, saved, ran, and then went forward again but couldn't replicate the problem.

Les - I was using -d, and checked for stray .class files in case I was missing something, but like I said other changes were being put into effect, so I don't think it was stray files (especially as commenting out code and then readding fixed the issue)

I guess I'll go with the 'Windows Black Hole Effect'

Thanks anyway!

Nick
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!