The moose likes HTML, CSS and JavaScript and the fly likes printing the string Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "printing the string" Watch "printing the string" New topic
Author

printing the string

santhoshkumar samala
Ranch Hand

Joined: Nov 12, 2003
Posts: 156

I want to print the caharacter 's' at a given position on the screen using jsp.
I have all my pixel positions stored in data base(x coordinate,y coordinate)
how I can print the character 's' at given coordinates either in java or in html
please help me


santhosh<br />SCJP,SCWCD
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
This is not that obvious, I think.
You may first divided your pages into several "boxes" (by Table). This table's cells are partitioned by the pre-defined cooridnates.
Thus, you can dynamically assign the character to that specific location at runtime.
But of course, this is not a good choice.
Another option is you consider to using JFC components, and print the character by providing the cooridnates of the components. But this is not a good choice as well, since it becomes thick client.
Thus, you may need to re-think it
Nick.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Don Kiddick
Ranch Hand

Joined: Dec 12, 2002
Posts: 580
create a class that extends JPanel.
Override the paintComponent method like so :

use like a normal JPanel.
D.
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50677

If by "screen" you mean the monitor, then JSP/HTML and related technologies will be no help to you. If you mean the browser window, then a simple CSS rule will do what you want.
Assuming that it is the latter for the moment, I'm sending this off to the HTML/Javascript forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
Is that what you are talking about??
<div style="position:absolute;top:100;left:200">X</div>
 
 
subject: printing the string
 
Threads others viewed
How can i have the coordinate on a buffered image ?
Coordinates of a object in javascript...
Difference between print and write
Isometric Tiles (Geometry)
Isometric Tile
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture