String
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Manish_Patel
Posted On:   Saturday, May 5, 2001 06:25 AM

hello, i have a probleam in this code below import java.awt.Font; import java.awt.Graphics; import java.applet.*; // public class example extends java.applet.Applet { String s= "hello"; String s1="welcome"; Font f=new Font("Arial",Font.ITALIC,24); public void paint(Graphics g) { //first i want to print string s with out setting the font // means default font g.drawString(s,100,100); //now i am trying to set font and then print string Font f=new Font("Arial",Font.ITALIC,24); setFont(f); // g.drawString(s,100,100); g.drawString(s1,300,300); }    More>>

hello,
i have a probleam in this code below


import java.awt.Font;
import java.awt.Graphics;
import java.applet.*;
//
public class example extends java.applet.Applet

{
String s= "hello";
String s1="welcome";
Font f=new Font("Arial",Font.ITALIC,24);
public void paint(Graphics g)
{ //first i want to print string s with out setting the font
// means default font
g.drawString(s,100,100);
//now i am trying to set font and then print string
Font f=new Font("Arial",Font.ITALIC,24);
setFont(f);

// g.drawString(s,100,100);
g.drawString(s1,300,300);
}

}
plz compile this code and show the result and then told what should i do to
clear this probleam and print both the string with different font size.
thank you
manish nakrani
nakrani_m@rediffmail.com
nakrani_m@yahoo.com

   <<Less
About | Sitemap | Contact