Silkroad Online Forums

A community forum for the free online game Silkroad Online. Discuss Silkroad Online, read up on guides, and build your character and skills.

Faq Search Members Chat  Register Profile Login

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Any java programers here?
PostPosted: Sun Oct 28, 2007 7:27 pm 
Regular Member
User avatar
Offline

Joined: Feb 2007
Posts: 227
Location:
Aege
Well I need someone to help me with basic java. Just learning the ways of programing and my teacher wants to me to make a business card. The program that we use is java IDE. I would like to know what the code for changing the text font for a title. For the companies name I would like to inlarge the font, any know the code for that

Code:
// The "BusinessCard" class.
import java.awt.*;
import hsa.Console;

public class BusinessCard
{
    static Console c;           // The output console
   
    public static void main (String[] args)
    {
        c = new Console ();
       String companyname, name, address,email,position,
         phone;
        int year;
       
c.println(" Type in the company's name, then press <enter>");
        companyname = c.readLine ();
        c.println(" Type in your full name , then press <enter>");
        name = c.readLine();
        c.println(" Type in your position is the company, then press <enter>");
        position = c.readLine();
        c.println(" Type in your adress, then press <enter>");
        address = c.readLine();
        c.println (" Type in the companies phone number, then press <enter>");
        phone = c.readLine();
        c.println(" Type in your e-mail address, then press <enter>");
        email = c.readLine();
        c.println(" Type in the years of service your company has been running for, then press <enter>");
        year = c.readInt();
        c.clear();
        c.println();
        c.println();
        c.println();
        c.println();
        c.println();
        c.println();



Quote:
c.println("\t\t\t\t" + companyname);
this part, i would like to inlarge the it.
Code:
c.println();
        c.println("\t\t\tName: " + name);
        c.println("\t\t\tPosition: " + position);
        c.println ("\t\t\tAdress: " + address);
        c.println("\t\t\thone: " + phone);
        c.println("\t\t\tE-mail address: " + email);
        c.println("\t\t\tYears of service: " +year);
       
        c.drawRect (120, 100, 400, 200);
        c.setColor (Color.red);
        c.fillRect (120,95,20,220);
        c.fillRect (125,95,410,20);
        c.fillRect (521,95,20,220);
        c.fillRect (120,301,430,20);
        c.setColor (Color.blue);
        c.fillRect (100,80,20,240);
        c.fillRect (100,80,460,20);
        c.fillRect (540,95,20,245);
        c.fillRect (100,320,460,20);
        c.setColor (Color.green);
        c.fillRect (80,65,20,290);
        c.fillRect (80,60,490,20);
        c.fillRect (560,60,20,290);
        c.fillRect (80,340,500,20);
        // Place your program here.  'c' is the output console
    } // main method
} // BusinessCard class
c.println(" Type in the company's name, then press <enter>");
        companyname = c.readLine ();
        c.println(" Type in your full name , then press <enter>");
        name = c.readLine();
        c.println(" Type in your position is the company, then press <enter>");
        position = c.readLine();
        c.println(" Type in your adress, then press <enter>");
        address = c.readLine();
        c.println (" Type in the companies phone number, then press <enter>");
        phone = c.readLine();
        c.println(" Type in your e-mail address, then press <enter>");
        email = c.readLine();
        c.println(" Type in the years of service your company has been running for, then press <enter>");
        year = c.readInt();
        c.clear();
        c.println();
        c.println();
        c.println();
        c.println();
        c.println();
        c.println();
       
       
        c.println("\t\t\t\t" + companyname);
        c.println();
        c.println("\t\t\tName: " + name);
        c.println("\t\t\tPosition: " + position);
        c.println ("\t\t\tAdress: " + address);
        c.println("\t\t\thone: " + phone);
        c.println("\t\t\tE-mail address: " + email);
        c.println("\t\t\tYears of service: " +year);
       
        c.drawRect (120, 100, 400, 200);
        c.setColor (Color.red);
        c.fillRect (120,95,20,220);
        c.fillRect (125,95,410,20);
        c.fillRect (521,95,20,220);
        c.fillRect (120,301,430,20);
        c.setColor (Color.blue);
        c.fillRect (100,80,20,240);
        c.fillRect (100,80,460,20);
        c.fillRect (540,95,20,245);
        c.fillRect (100,320,460,20);
        c.setColor (Color.green);
        c.fillRect (80,65,20,290);
        c.fillRect (80,60,490,20);
        c.fillRect (560,60,20,290);
        c.fillRect (80,340,500,20);

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group