Results 1 to 2 of 2
  1. #1
    dd2308 is offline Member
    Join Date
    Sep 2012
    Posts
    28
    Rep Power
    0

    Default Converting to full screen

    I am trying to load an image into a full screen viewer. I am aware of the various classes but i cannot put the pieces together.

    Here is the code
    for the application

    import java.awt.Graphics;
    import java.awt.Panel;
    import java.awt.image.BufferedImage;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;

    import javax.imageio.ImageIO;
    import javax.swing.JFrame;


    public class Main extends Panel



    { public static void main(String args[]) throws
    Exception {
    JFrame frame = new JFrame("Slime");
    Panel panel = new Main();
    frame.getContentPane().add(panel);
    frame.setSize(500,500);
    frame.setVisible(true);
    }

    public void paint(Graphics g) {
    g.drawImage( img, 0, 0, null);
    }

    BufferedImage img;
    public Main() {
    try {img = ImageIO.read(new File
    ("C:/slime.jpg"));
    } catch (IOException ie) {}
    }//img method

    }//End of Main class

    How do i convert to full screen?
    Thanks

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,029
    Rep Power
    23

    Default Re: Converting to full screen

    You're expected to go through links posted in responses to your questions.
    http://www.java-forums.org/new-java/...tml#post300397

    Edit your post and add code tags.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 9
    Last Post: 09-06-2012, 09:37 AM
  2. Full screen problems
    By doctorned in forum New To Java
    Replies: 4
    Last Post: 12-10-2009, 10:40 AM
  3. Full screen test
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-23-2008, 11:24 PM
  4. how to set full screen dimensions
    By valery in forum New To Java
    Replies: 1
    Last Post: 08-03-2007, 06:08 PM
  5. Full screen
    By Jack in forum Advanced Java
    Replies: 2
    Last Post: 07-02-2007, 05:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •