Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JLayeredPane issues: Simple Program, 100 line Program, no Errors  RSS feed

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Please read the title (you probably have but just to be sure...).

2. Purpose: I am making a "SlideShow" program for a project at school. I am not in a tech class and could use M$'s "PowerPoint" if I wanted to, but I decided to make use of my programming skills and along the way learn something. I have never used a JLayeredPane before, so this is my first time.

3. Issue: When I start the program up and push right, the name is correct. The name at the top is always correct. The problem is with the JLayedPane. When I push right for the first time, the name is correct but the JLayeredPane is stuck ("Shirah" and "Kaelen"). Then, when I push right again, the JLayeredPane is fine. When I get to the slides "Marcus" and "Shirah", it is stuck on grey (if you push right and left on the arrow keys). When you push right or left again, it works fine. I would like to fix these bugs before I get more into the project. I suspect the problem is not with the JLayeredPanes, but with the methods check() and/or keyPressed().

4. Note: I just started this today so it has really nothing on it. Please don't worry about the content, just the problem. Plus, this is closer to an SSCC (or whatever it's initials are). This is due in two days, (my group members have not sent in their information yet, so I am working on the program until they send me the information) so if I could get responses quickly, that would be great.

Here is my full code:



Thanks,
John Price aka cc11rocks
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found a fix. Was checking to see if it was the layers behind it. It was. I only had to change "check()". Here is check():

Thanks,
cc11rocks aka John Price
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!