Chad McAtee

Greenhorn
+ Follow
since Feb 23, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chad McAtee

Ok lets me see if I understand this. You extend a class FullScreenTest extends JFrame. When the FullScreenTest class is loaded is automatically creates a JFrame object as well. Which is why in the Run() method setBackground setForegroundround and font methods.
do not create an error. So its like having an invisible object?

11 years ago


What I am not understanding is how the THIS keyword is used in the screen,setFullScreen(displayMode,this);
That method requires a DisplayMode object and JFrame object to be passed to it. Im not following how THIS is referencing a JFrame object.
Also setBackground(Color.blue); setForeground(Color.white); setFont(new Font("Dialog", Font.PLAIN, 24)); in the Run method. Seems answering the first ?
would answer how setForeground ect is being applied to a JFrame that is being displayed.
11 years ago
When I add a Jpanel to my JFrame I lose the background color of the JFrame. Also every article I have read never mentioned having to make a Component object to getContantPane() before being able to change the background color of a JFrame. If anyone could shead some light on the logic behind this please explain. I am really new to programming so take it easy on me

12 years ago
Hey folks,

I am new to this site as well as java programming. Dont understand the logic behind while this compiles correctly.



also with the if(true) statement what condition is being tested as being true?

However this compiles with the error variable not initialized
13 years ago