wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How do I take a variable and print it to a cursor using SWT? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How do I take a variable and print it to a cursor using SWT?" Watch "How do I take a variable and print it to a cursor using SWT?" New topic
Author

How do I take a variable and print it to a cursor using SWT?

Wc Swanson
Greenhorn

Joined: Feb 09, 2011
Posts: 1
I am rewriting an application in Java from the Processing IDE to Eclipse. In Processing I have been able to get a variable printed to the cursor using the following code:

import processing.serial.*;
import java.awt.*;
import java.awt.event.*;

Robot robot;

try
{ robot = new Robot(); }
catch (Throwable t)
{
t.printStackTrace();
exit(); // If there is an exception here, we might as well exit
}

for (int i=0; i<s.length(); i++)
{
println("keyPress: " + s.charAt(i) + " i: " + i + " :: " + (int)s.charAt(i));
{
robot.delay(90);

}

Does anyone have any sample code using SWT?

The purpose is to take a reading from a serial port and drop the reading at the cursor which could be in a spreadsheet.

Bill>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I take a variable and print it to a cursor using SWT?
 
Similar Threads
Retrieving tooltiptext from a game....
Get x,y coords outside of windows/screen using mouselook technique
What is the error?
Writing a Recursive Descent Parser, I think I'm done, well almost?
to change cursor symbol in JTable cells