Total members 11894 |It is currently Fri Nov 22, 2024 5:23 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Positions X-Y parameters to text drawing methods
java code
import java.awt.*;
import java.applet.Applet;

/*
* Very simple applet that illustrates parameters to text-drawing methods.
*/

public class TextXY extends Applet {

public void init() {
validate();
}

public void paint(Graphics g) {
Dimension d = size();

g.drawString("My Text at (4, 6)", 4, 6);
g.drawString("My Text at (3, 31)", 3, 31);
g.drawString("My Text at (3, height)", 3, d.height);
}
}




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Positions X-Y parameters to text drawing methods
 Able to Copy Text from Uneditable Text Boxes(JTextfields)     -  
 Which methods is best for SEO?     -  
 What Are Constructor Methods?     -  
 methods in ActionListener interface     -  
 Calling Overloaded Methods     -  
 JSP Passing Arrays to Methods     -  
 Static Methods and Variables     -  
 Can we override static methods in java     -  
 methods with variable arguments list     -  
 Program to compute commission using two methods     -  



Topic Tags

Java Graphics






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com