Woh to draw anywhere in the screen?

Hi,
This might be a silly question but I haven't practically any graphics programming on Java before.. I tried to google for a solution and also searched these forums but no help yet.
I need to draw some text and images anywhere in the screen. That is, the drawing is done to an on top of another (non-Java) program. I would do this periodically few times a second so that if the other program repaints, the text&images come visible again.
So, is there a way to acchieve this in Java?
- Maybe using some transparency settings for a frame and disabling any focus?
- Or maybe I can somehow manipulate the screen memory "directly"? In the Robot class there is a way to get the Colro of any pixel in the screen (Robot.getPixelColor). Is there a way to do it the other way around, that is, set the color of any pixel in the screen or draw tesxt in the screen?
Thank you very much!
BR,
Kari

I must have been sleeping when I wrote this (just saw the subject line)... :)
Woh = How

Similar Messages

  • Draw characters on the screen

    As we draw circles and other graphics, is there any way to
    draw characters on the screen or print characters on the
    screen?

    Do you mean you want to render Text with the drawing API?
    If so, there's no native way to do that, but it can be done
    by capturing a bitmapData copy of a TextField's contents and using
    it in a BitmapFill.
    But its much easier to use Degrafa with RasterText:
    http://www.degrafa.org/blog/2008/11/rastertext-for-advanced-text-graphics/

  • Draw directly to the screen (win32)

    Hi,
    I am attempting to draw directly to the screen in win32. The goal is to draw four small objects in each corner of the screen that will be painted on top of any existing windows, desktop objects and remain painted even after screen is refreshed. A screenshot overlay is not possible, it has to be real-time.
    I've scoured for a java class to accomplish with little luck and haven't been able to find much in the way of win32 api options either.
    Any advice given to point me in the right direction would be greatly appreciated.
    Thanks!
    -squirrellyj

    In the windows API you can create a window and set it to be on top of all other windows
    SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    I think that in J2SE 5 or 6 you can do it from java directly but I'm not sure.
    So just create 4 windows and put them in 4 corners of the screen.

  • Recently Thunderbird started popping up big yellow "notes" if I hover too long anywhere on the screen. How do I make it stop?

    There must have been a recent update, and now when my cursor rests almost anywhere on the Thunderbird window, big yellow notes pop up, describing whatever I'm hovering over. I want to turn this feature off.
    I wish I could get a screen shot, but whenever I try to, the pop up disappears.
    I'm using a Mac, and version 24.6.0

    Are you sure that you do not have an add on doing this? I am running ver. 24.6 on a PC and I have never seen this occur.
    You can restart with add ons disabled under the Help menu.

  • How to draw text onto the screen?

    Hi,
    I'm looking for a way to draw a String directly onto the screen.
    Anybody have any ideas?
    Regards
    ABourke.

    Someone posted a nice example of what the OP wants a while ago on [java.net|http://forums.java.net/jive/thread.jspa?threadID=57353&tstart=30] : [CircleScroller (jnlp)|http://mac-systems.de/circlescroller/launch.jnlp].
    It uses the 6u10 [transparant window feature|http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/], but he didn't post the code itself.

  • FPS drops when tapping anywhere on the screen

    Have had this problem since I first started with mobile apps. Any solutions? I've searched thoroughly and can't find any answer.
    I add an FPS displayer to the app to keep track of the FPS (btw, is capitalized FPS only used for First Person Shooter or also the Framerate?, should the framrate be "fps"?, alsways wondering that ). Wherever I tap the screen, the FPS drops. I don't even have to have any other code, so it's not even a button I tap. It can be in an empty black space and it just makes the game run slower. Even if I remove the FPS displayer and just add the smallest code needed to move an mc from the left side to the right and tap the screen fast while it moves, it moves stuttery and/or slows down. If the screen is not touched, it can take it 5 secs to go from left to right, if I tap the screen as fast as I can while it moves, it can take up to 8+ secs before it gets to the right side.
    So, what's up with this slowdown when the screen is touched in Adobe Air mobile apps? Been like this since the very first Adobe Air/SDK version I used, and right now I'm using the latest one (3.7). And it happens both with GPU and CPU. If I don't tap the screen furiously, the stuff runs great and good framerate. In some cases it also slowsdown if I just hold the finger down on the screen and moving it around. But then it usually have to be on something, not just blank space.
    I surely can't be the only one.

    Bumping this thread. I'm building an AIR kiosk app (AIR 14.0 for Desktop, Windows 7 PC, Samsung LS24C770TS monitor), and am experiencing a similar issue as Tenchy.
    If the user quickly taps any visible MovieClip (even MCs that don't have any touch event listeners) in my app, it causes severe lag in other touch events. Odd thing is that the frame rate is not affected by tapping fast, it's just that other touch events are delayed while tapping non-interactive MCs.
    Referencing the thread below, I've tried both mouseEnabled = false and mouseChildren = false, on the non-interactive MCs. This doesn't fix the issue. The touch objects and non-touch objects are not deeply nested.
    severe frame rate drop when touching screen iOS
    Has anyone found a solution for this issue?

  • A click anywhere on the screen causes a spinning ball. iMac 27inch

    We get a spinning ball when we click on anything on the screen. We rebooted. We disconnected periferals. We disabled TimeMachine. Still spinning ball. Very slow bootup of any app.

    The SBBOD can be caused by many things so it's a little difficult to troubleshoot. I would recommend starting by restarting the computer in Safe Mode. This will clear some caches, it's possible one or more have become corrupted. If that doesn't do it there is an excellent article that lists trouble shooting steps, the cause for your problem is probably located in it. The article is Spinning Beach Ball of Death .
    Common causes are a too full HD, failing HD, not enough RAM, a process that is taking too much %CPU etc. If you still can't find the cause after using these tools you will need to bring the machine into an Apple Store or AASP to be diagnosed.

  • Best way to make small icons anywhere in the screen.

    Hi,
    I'm trying to make for my application sort of like a panel where the user will have in the background a JPG image that will be a map and on top of that I need to have smaller images or icons that will be nodes of a network and those nodes will have to attributes that will determine the position in the screen to fit the map underneath.
    Also every node will have to be able to be clicked to open another window that will contain data from that node.
    I'm new to Java and I don't know which is the best way to do that in Java. Can someone point me to the right direction?
    I thought of using Icons or maybe buttons with the node image on top. But I'm not sure if that is the best approach.
    Thank you.

    Here's a pretty crude example of how to do what you want to do.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.util.ArrayList;
    import java.util.Iterator;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class SampleMap {
         public SampleMap() {
              ArrayList<MapNode> mapNodes = new ArrayList<MapNode>();
              mapNodes.add(new MapNode(100, 100, "Node 1"));
              mapNodes.add(new MapNode(250, 250, "Node 2"));
              JFrame frame = new JFrame();
              frame.setTitle("Map Example");
              frame.add(new ImageMap(mapNodes));
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              new SampleMap();
         private class ImageMap extends JPanel{
              private static final long serialVersionUID = 7819553397548728320L;
              private ArrayList<MapNode> nodes;
              public ImageMap(ArrayList<MapNode> mapNodes){
                   nodes = mapNodes;
                   setMinimumSize(new Dimension(800, 600));
                   setPreferredSize(new Dimension(800, 600));
                   addMouseListener(new MouseListener() {
                        public void mousePressed(MouseEvent arg0) {
                             Rectangle rect = new Rectangle(arg0.getX() - 10, arg0.getY()-10, 10, 10);
                             Iterator<MapNode> iter = nodes.iterator();
                             while(iter.hasNext()) {
                                  MapNode curNode = iter.next();
                                  Point curPoint = new Point(curNode.getXPos(), curNode.getYPos());
                                  if(rect.contains(curPoint)){
    //TODO launch new JFrame with curNodes details
                                       System.err.println("Clicked on: " + curNode.getTitle());
                                       break;
                        public void mouseReleased(MouseEvent arg0) {     
                        public void mouseExited(MouseEvent arg0) {     
                        public void mouseEntered(MouseEvent arg0) {     
                        public void mouseClicked(MouseEvent arg0) {     
              public void paint(Graphics g) {
                   Graphics2D g2 = (Graphics2D)g;
      //TODO replace rectangle with a background image
                   g2.setColor(Color.WHITE);
                   g2.fillRect(0, 0, 800, 600);
                   Iterator<MapNode> iter = nodes.iterator();
                   while(iter.hasNext()) {
                        MapNode curNode = iter.next();
                        g2.setColor(Color.RED);
                        Image tmp = createImage(10, 10);
                        Graphics tmpG = tmp.getGraphics();
                        paintComponent(tmpG);
                        g2.drawImage(tmp, curNode.getXPos(),curNode.getYPos(), this);
                   repaint();
         private class MapNode {
              private static final long serialVersionUID = 7819553397548728321L;
              private int xPos;
              private  int yPos;
              private String title;
              public MapNode(int x, int y, String name) {
                   title = name;
                   xPos = x;
                   yPos = y;
              public int getYPos(){
                   return yPos;
              public int getXPos() {
                   return xPos;
              public String getTitle() {
                   return title;
    }

  • Pictures from my Sony HDR-CX110 uploads easy in image capture but how do i upload videos? I don't even see my videos anywhere on the screen! I'm puzzled.

    Pictures from my Sony HDR-CX110 uploads easy in image capture but how do i upload videos? I don't even see my videos on the screen. I'm puzzled!

    Photo Stream does not do videos. For videos, you must import to your computer. You can use iPhoto to import them.

  • How can I get rid of a blue square that appears when click anywhere on the screen?

    I have opened an architectural drawing but when I tried to delete some lines and I click on he screen a blue square appears and I can not select the line to delete. Any help would be appreciated to get rid of this annoying blue square.
    Thanks

    Adobe CSS 4, Windows. The file is a PDF file. Please see below ... Thanks for your help !

  • How can you left click anywhere on the screen automatically using applescript

    Im trying to create a script that automatically opens up an application and then click on the buttons inside of the application (Note that the buttons that the application uses are not considered buttons by applescript's standards). What I tried so far is this:
    tell application "System Events"
      click at {724, 490}
    end tell
    The faults that I can see so far is that I didn't specify whether I wanted to do a left or right click. Please help

    Adobe CSS 4, Windows. The file is a PDF file. Please see below ... Thanks for your help !

  • How do i turn off talkback when the screen is locked?

    How Do I Turn Off Talkback When The Screen Is In Locked Mode? It Will Not Allow Me To Get To The Accessibility Icon.....

    Hi
    I’d be happy to help you disable talkback on your Moto E! If you have inadvertently enabled Talkback, you can quickly pause it, and then go back to disable this feature.
    Anywhere on the screen, swipe down then right in a single motion, as if you were drawing an “L”.
    Note: This should work whether the phone is on the lock screen or unlocked.
    You will then see 2 options in the top corners of the screen, select “Pause Feedback”.
    When the Suspend Talkback message appears, double tap “OK”.
    You can now normally go into Settings > Accessibility and disable talkback.
    I hope this helps!
    Charise

  • Sometimes I can't get out of Day view in iCal.  There is no where on the screen to select month view, even when I close it out and go back into iCal.

    Sometimes I am locked in "day" view in iCal.  There is no where on the screen to choose "month" view, even when I close it out and open again.  Tapping anywhere on the screen or scrolling doesn't help.

    Give this a try:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder: User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try full screen again.
    NOTE: For Mavericks and Yosemite,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • If I move my wacom pen tool on the screen I get a yellow note. How do I get rid of it or turn it off?

    I just installed OS X Mountain Lion. I have a wacom pad and pen. When I move the pen to highlight text, or move the cursor anywhere on the screen, a yellow lined sheet note shows up and a scribble (the pen movement) is shown in black. If I click elsewhere the yellow sheet enlarges by adding on sections. I have to click on a blank place on the web page or the border to clear the sheet away.
    Where is this coming from and how do I disable this automatic note? It shows up on web pages, MS word documents, email box, windows, QuarkXpress and Photoshop documents as well. Help! It's very annoying!
    Thanks,

    I discovered that in System Preferences in the Hardware section there is an item called Ink. I opened it up and turned off the Handwriting recognition. That stopped it from becoming active everytime I dragged my pen tool. When I installed the OS X Mt. Lion, it had automatically turned on.
    Problem solved.

  • 4s touchscreen slightly non-responsive and making "boxes" around any item i touch on the screen

    Hello apple community,
    I let my friend borrow my new iphone 4s for a second and when i got it back it had major screen issues.  For some reason when i use the touchscreen now it wont slide at all.  when i touch an app (or anywhere on the screen for that matter) a little box comes up around the app and i have to double click it to get it to open.  Other than that the phone still works fine, im guessing something is wrong with my settings??
    PLEASE HELP!!!
    thanks

    Hello apple community,
    I let my friend borrow my new iphone 4s for a second and when i got it back it had major screen issues.  For some reason when i use the touchscreen now it wont slide at all.  when i touch an app (or anywhere on the screen for that matter) a little box comes up around the app and i have to double click it to get it to open.  Other than that the phone still works fine, im guessing something is wrong with my settings??
    PLEASE HELP!!!
    thanks

Maybe you are looking for

  • Adobe Photoshop cs4 extended invalid serial number

    I just bought adobe photoshop cs4 extended from a large retail computer store.I had the trial version of photoshop cs4 extended.I uninstalled the trial version and installed from dvd.I got a Invalid serial number error.I am sure there was a software

  • In order related billing its possible to have split invoice

    hello, In order level i am getting two line  items which are order related billing,can i split the invoice in to two,for two line items. please guide me

  • Project Sharing - Best Practices

    Our new business plan is going to require that we have multiple developers working on a single NetWeaver Project (EP and Web DynPro projects). What is the best way to set this up so we can all work on a project together? Our current process simply pl

  • Safari keeps asking for Keychain Access

    Everytime I use Safari after some time it asks for Keychain access. I disabled the autofill forms feature already, but it does not stop asking. Does anybody know how to keep Safari from doing this without disabling the password protection of my keych

  • Preview has stopped responding to clicks

    Preview has stopped responding to clicks and now only scrolling and hotkeys work. I already tried resetting the preferences and restarting.  Once in Preview I can't click on any system menus.  The only way to switch is using 4-finger swipe to mission