Thursday 25 April 2013

Strange Error Occurs...

Okay...this is so weird, I'm not even sure if it can be considered an error or not...I mean, it's not supposed to do this so of course it's an error (facepalm).

I'm in the middle of making my "About" screen, which has to include stuff like who it belongs to, copyright (Me), year, etc etc... ( I think!). Anyways. So I made an "About" button on my menu screen and tested it out after adding the MouseListener and whatnot. I clicked it. Perfectly fine (although it's centred and I didn't write any code to make it so), except if I close the window and run the program again, press the INSTRUCTIONS button first, then press the BACK button, THEN, when I press the "About" button, the words (c) Vivian Luu shows up TWICE. Not once, but twice. Why? I have no clue.
It's the strangest thing I've ever come across.

Either my computer has gone wonky or my program is crashing because I imported java.awt.* and javax.swing.awt* even though I'm not using all of the things included in the packages. Does a program even crash like that?
I fiddled with it a bit, like making the text of "About" set so it's uneditable, placed a BorderLayout in the aboutPane, and added the "Back" button to it. Then I ran it again. I checked the About screen, and it looked alright. I clicked back, clicked "Instructions", and went back to "About". I would have done a short happy dance, except that when I tried this a few more times, it started glitching on me.
Me: ....what?
My program: (stops working)
And I get this white screen. I click my mouse and my instruction screen shows up. Phew. I click back. Then I click "About". Again, it takes a few seconds for everything to pop up. This happened in my last program so I wasn't too worried. I clicked "Instructions" again and this time a black screen greeted me.
Uhhhh, so what's happening? I move the window around. That works. I click it. Nothing happens. Then I try to click Google Chrome, which was open. THE BLACK INSTRUCTION SCREEN POPS BACK UP.
I click another window. It pops back up again. I click minimize. And click another window. My computer's task bar tells me that I'm still on the black instruction screen even though I see my browser. I click my browser and for a second I see that my Google Chrome icon is highlighted, but then it jumps back the java screen with the black instruction screen, even though it's minimized.
So I started the task manager but the black window's still saying that it's there which makes everything else unclickable.
I try to end the window, but it won't worrrrk! I keep on clicking on the end task button until a bunch of "End Now" or "Send Error Report" window pops up and I click "End Now" which worked. But still.
That was super weird!
I tried it again, this time just importing the stuff I needed, but it still happened. Guess it must be my computer then.

Conclusion of Today's Programming
  1. I found a suspicious error with my copyright sign that disappeared after some fiddling
  2. My program's glitching and the window won't close without forcing it to close using the task manager
  3. I think it's my computer's fault.


4 comments:

  1. Huh. Interesting. The last time my programs crashed, they just...killed themselves. Never showed black screen or anything.

    ReplyDelete
  2. Oh. But were you working on GUIs? Because only that frame turned black

    ReplyDelete
    Replies
    1. O__________________________o

      Maybe it had something to do with JCreator...never seen a black frame on Netbeans.

      Hahahhahaa, yeah, I had an infinite loop in my last project it just lagged until it crashed

      Delete