Results 1 to 2 of 2
  1. #1
    Darkzombies is offline Senior Member
    Join Date
    Nov 2012
    Rep Power

    Default How do you use Graphics in applications?

    The Graphics class may be applet specific only, but if not, I'm having trouble finding any articles not based around applets about it.

    Java Code:
    import java.applet.Applet;
    import java.awt.*;
    import javax.swing.JFrame;
    public class Main extends Applet{
    	public void paint(Graphics g){
    		g.drawString("Hello World", 100, 100);
    	public static void main(String[] args){
    		JFrame frame = new JFrame();
    		Main a = new Main();
    		frame.getContentPane().add(a, BorderLayout.CENTER);
    		frame.setSize(new Dimension(1360,768));
    I need that, but in application form.

    Also, if anyone remembers me from like 5 months ago. You are instantly awesome. You guys helped me finish my text adventure
    Last edited by Darkzombies; 05-03-2013 at 08:33 AM.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Rep Power

Similar Threads

  1. Drawing a graphics onto another Graphics ?
    By Ziden in forum Java Applets
    Replies: 0
    Last Post: 01-08-2011, 07:30 PM
  2. Web applications
    By etisc in forum New To Java
    Replies: 1
    Last Post: 01-02-2011, 03:28 PM
  3. Standalone applications
    By sachin2 in forum New To Java
    Replies: 0
    Last Post: 07-21-2009, 08:08 PM
  4. Stand Alone Applications?
    By djpg2000 in forum New To Java
    Replies: 5
    Last Post: 09-05-2008, 07:23 PM
  5. Logging applications
    By ravian in forum New To Java
    Replies: 2
    Last Post: 01-02-2008, 06:43 PM

Posting Permissions

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