Results 1 to 3 of 3
  1. #1
    topscore is offline Member
    Join Date
    Oct 2013
    Posts
    1
    Rep Power
    0

    Default why different view of application?

    who can tell why the same code produce different view
    compile javac psw.java

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

    public class psw extends JFrame {
    String symbols="~ ! @ # $ % ^ & * ( ) _ = + : ; < , > . ? / | \\ '";

    public static void main(String[] args){
    psw app=new psw();
    app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) ;
    app.setSize(600, 450);
    app.setVisible(true);
    app.getContentPane().setBackground(new Color(30,144,255));
    }

    public void paint(Graphics g) {
    Graphics2D g2=(Graphics2D) g;
    g2.setColor(new Color(255,255,255));
    g2.drawRect(10, 10, 60, 50);
    g2.drawLine(60, 50, 220, 20);
    g2.drawString(symbols, 10, 150);
    }
    }

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default Re: why different view of application?

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    sehudson's Avatar
    sehudson is offline Senior Member
    Join Date
    Mar 2010
    Posts
    357
    Rep Power
    5

    Default Re: why different view of application?

    what do you mean different view? Different from what to what?

Similar Threads

  1. Replies: 0
    Last Post: 04-08-2013, 10:48 PM
  2. How enter this mode-gui/design-view/code-view
    By lse123 in forum NetBeans
    Replies: 0
    Last Post: 02-28-2010, 10:09 PM
  3. Replies: 1
    Last Post: 08-05-2009, 03:43 AM
  4. A view to help
    By hervey in forum Reviews / Advertising
    Replies: 1
    Last Post: 10-29-2008, 08:37 AM
  5. Updating a view using actions in a seperate view
    By xcallmejudasx in forum Eclipse
    Replies: 0
    Last Post: 10-24-2008, 10:24 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
  •