Can't see screen

0 John Miko · August 1, 2015
Wondering if anyone else was having this problem. I watched the video again to see if I made a syntax error somewhere but I didn't see it. So wondering if it is because the tutorial is old or I just made an error somewhere.


Post a Reply


Oldest  Newest  Rating
0 Gary Whitney · September 11, 2016
John and Mitchell
If you are new to these videos, then I offer the following advice.

The tutorials were created several versions of Android ago.
Each new version comes with new templates that adhere to the latest design philosophy.
Try this when you see "Start a new Blank Activity".
1. Start a new "empty Activity".
2. DO NOT change the Activity to extend the Activity in the video.
3. Do not change the theme from AppTheme.
This should get you started without errors.
Good Luck.
0 Mitchell Sotto · September 10, 2016
I"m having the same problem and can't fix it. Did you ever figure this out?
0 John Miko · August 1, 2015
Yes, this is the code I have written. I believe it's a copy of the new boston tutorials on Java Game Development 3-6

package bost_tut_g3_creating_a_screen_for_game_developmen;

import java.awt.*;
import javax.swing.JFrame; 

public class bucky extends JFrame {
public static void main(String[] args){

//takes 4 parameters
//resolution(x and y), bit depth (8,16, or 32)
//refresh rate, we don't know it
DisplayMode dm = new DisplayMode(1366,768,16,DisplayMode.REFRESH_RATE_UNKNOWN);
bucky b = new bucky();;
public void run(DisplayMode dm){
setFont(new Font("Arial",Font.PLAIN,24));

//now we can call any of the methods in our screen class right here
Screen s = new Screen();
try {
s.setFullScreen(dm, this);
//if it doesn't sleep
catch(Exception ex){}

//when you make a JFrame it calls the paint method
//does this once automatically
//if you want it to happen again you have to call repaint

public void paint(Graphics g){
//is actually graphics2d object
//if g is an object of type Graphics 2D
if (g instanceof Graphics2D){
//we're going to take the g object and make it a
//Graphics2D called g2
Graphics2D g2 = (Graphics2D)g;
//converted it to 2d to use this method. We want antialiasing on (make the text smooth)
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.drawString("This is gunna be awesome",200,200);

package bost_tut_g3_creating_a_screen_for_game_developmen;

import java.awt.*;
import javax.swing.JFrame;

public class Screen {
//choices, you can build a window screen, like a program
//can build an applet, runs on a server
//can also build a full screen game, doing full screen

//used to access the video card
private GraphicsDevice vc;

public Screen() {
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
//now have access to our screen
vc = env.getDefaultScreenDevice();

public void setFullScreen(DisplayMode dm, JFrame window){
//try setting this to true
//going to convert to full screen

//if vc is able to change the display
if(dm != null && vc.isDisplayChangeSupported()){
try {
}catch(Exception ex){}

public Window getFullScreenWindow(){
return vc.getFullScreenWindow();
//make method to get rid of full screen
public void restoreScreen(){
Window w = vc.getFullScreenWindow();
if(w != null){
//when you close a window you want to dispose it
//frees up memory


0 John Miko · August 1, 2015
When I run the program a java application shows in my task bar and the text "This is going to be awesome if I try to alt tab to the java application. When I alt tab to the application I cannot click anything but I cannot see the window. So I think the program ran but I cannot see it for some reason
+1 Rashad Kadado · August 1, 2015
Could you possibly share what you have done? so we can see what sort of errors you could have made.
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator