Java 2D Robot Maze

Can anyone provide some guidance or perhaps a working solution to this problem as I need this very urgently:
Implement an animation program based on Java 2D which simulates the navigation of a tiled maze by a robot.
The maze should be splitted into N x N cells (for example 100 x 100 tiles).
The robot should find the shortest path from any given initial position to any given target position using the A* algorithm.
The program should show the robot moving from cell to cell.
I hope this is enough description based on the problem.
Waiting for your replies...
I haven't made a progress to start with this assignment so I can't really say anything about what's not working. I do understand what the brief outlines for the project but I can't get the grips on how and where to start and thats my major problem. I hope someone can enlighten me.
I have looked at several sites that contain bits and pieces but none have the java2d source code.
This is a great site that states A* Algorithm [pathfinding]:
http://www.policyalmanac.org/games/aStarTutorial.htm
This is exactly what I need to do for my assignment but using java2d environment [images clearly show what needs to be done in order to reach destination from the starting point without colliding with the obstacles]. I hope this any help.
P.S It is very important as I dont have much time left.
Kind regards

Its not that I want others to do my work, as I already have some of the code but having to bring it together as a whole [classes] confuses me and it's really depressing me and I thought someone could help me out from this hell hole by guiding or perhaps lending me a hand or two from scratch...
The site that I quoted earlier on this thread has all the screenshots. Perhaps checking it out will give you some insight of what I really need to do as part of my assignment.
Kind regards

Similar Messages

  • Focus in java.awt.robot

    A couple of hours ago I read about java.awt.robot and I thought it was really cool.
    Right now I have a working code that presses a couple of key and uses a listener to put them in the "messages" area of Borland JBuilder.
    Is there any way to get these keys to be typed globally?
    (ie. other programs read them as if the user was typing them.)
    I haven't had much time to test out things like focus of the programs or messing with priorities in the task manager but any help would be appreciated =]
    BTW, this isnt a hacking thing....just trying to make a program to automate tasks on my computer :)
    ~Thanks

    Is there any way to get these keys to be typed
    globally? Sure. The keys typed by robot can be received by other non-java apps.
    I haven't had much time to test out things like focus
    of the programs or messing with priorities in theor what about focus? Using the robot it's just like you'd normally focus on something; you click.
    task manager but any help would be appreciated =]priorities in the task manager? In general you can't do anything in java about how the task manager prioritizes jobs. You can make your own internal threads higher or lower priority tho.

  • How need to take screen shot of the screen using java.awt.Robot from javafx

    1) I am displaying a Stage which is having an image and shapes in it and wanted to take the screen shot as and when i move the shape( which moves the stage ).
    I am trying to java.awt.Robot, but i am getting headless exception. I used
    @Override
    public void start(final Stage primaryStage) {
    // creating some images and shapes
    Platform.runLater(new Runnable() {
    @Override
    public void run() {
    // update();
    public void update() {
    if (stg.isShowing()) {
    ScreenCapture.capture(stg.getX() + 2, stg.getY() + 2, (int) boundsOfCircle.getBoundsInParent().getWidth(), (int) boundsOfCircle.getBoundsInParent().getHeight());
    magnifierImageView.setImage(new Image(SCREEN_SHOT_FILE));
    public static void capture(final double x, final double y, final int width, final int height) {
    EventQueue.invokeLater(new Runnable() {
    public void run() {
    try {
    System.out.println("x ="+x +" y = "+y +" width "+width +" height ="+height);
    Robot robot = new Robot();
    } catch (Exception e) {
    System.out.println("exception arised while taking the screen shot ");
    e.printStackTrace();
    The above code throws headless exception.
    2) The second issues is have a image & i am dividing the image into different rows and cols( images of same size ). This is i am doing using awt. and i wanted to load those different images into
    javafx images . I am facing the issues when i try to load the images into javafx.

    hi,
    click on print screen button in your keyboard.
    open a word document and do Ctrl V .
    *Reward points if it helped

  • Taking screenshot with java applet using java robot class not working

    Hi Everyone,
    I am using the java applet to take screenshot of the web browser using the java's robot class.
    Robot objRobot = new Robot ();
    BufferedImage objBufferedImage = objRobot.createScreenCapture(objRectArea);
    The thing work good in windows system taking screenshot but in case of mac osx i get the blank image.When i check the event viewer in mac osx i get the following error.
    invalid context
    invalid pixel format
    CoreAnimation: rendering error 506
    The problem is coming for all the browser safari,firefox and chrome.My applet is signed applet.
    What might be the reason.An early reply is very valuable.
    My machine configuration is as follows.
    OS : MAC OSX
    Version : 10.6.4
    Is that a system level issue , java plugin issue?I'am confused with this error.
    Thanks sagar.

    870613 wrote:
    invalid context
    invalid pixel formatHm, seems like the Mac implementation of the Robot class is doing some bad initializations there. I can't be a 100% sure of course, but this smells like a bug to me. Are you sure you have the latest version of Java installed?

  • Unable to capture a video using robot.createScreenCapture

    Hi all,
    I'm having one problem with robot.createScreenCapture, i used the
    below code to take screen shot, everything goes fine except one case, I'm unable to capture videos played in windows media player & winamp, black screen is displaying instead of the video. I used avi files.
    here is the code
    import java.awt.AWTException;
    import java.awt.Dimension;
    import java.awt.Image;
    import java.awt.Rectangle;
    import java.awt.Robot;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class CaptureImage implements ActionListener {
         Robot robot = new Robot();
         Image image = null;
         public CaptureImage() throws AWTException {
              JFrame frame = new JFrame("Capture");
              JButton button = new JButton("Capture");
              frame.setAlwaysOnTop(true);
              button.addActionListener(this);
              frame.getContentPane().add(button);
              frame.pack();
              frame.setVisible(true);
         public void actionPerformed(ActionEvent e) {
              // image = robot.createScreenCapture(new Rectangle(800, 600));
              String outFileName = "shot.png";
              // determine current screen size
              Toolkit toolkit = Toolkit.getDefaultToolkit();
              Dimension screenSize = toolkit.getScreenSize();
              Rectangle screenRect = new Rectangle(screenSize);
              // create screen shot
              Robot robot;
              try {
                   robot = new Robot();
                   BufferedImage image = robot.createScreenCapture(screenRect);
                   ImageIO.write(image, "png", new File(outFileName));
                   System.out.println("Saved screen shot (" + image.getWidth() + " x "
                             + image.getHeight() + " pixels) to file \"" + outFileName
                             + "\".");
              } catch (IOException e2) {
                   e2.printStackTrace();
              } catch (AWTException e1) {
                   e1.printStackTrace();
         public static void main(String[] args) {
              try {
                   new CaptureImage();
              } catch (AWTException e) {
                   e.printStackTrace();
    }

    Are you setting the videoPause property to true in the rule you're using to navigate to the video screen? For example, assume you're using a button to navigate to the VideoScreen, its OnSelect property should be: Navigate(VideoScreen, ScreenTransition!Fade,{videoPause:false}).
    Basically, the value needs to change for the video to pause. If you don't have that set up, you could also do that within the rule you're using to navigate to scrHome as follows:  
    UpdateContext({videoPause: false});Navigate(scrHome, ScreenTransition!Fade,{videoPause: true})
    Thanks
    Robin

  • Java and Internet Explorer automation

    Hi,
    I would like to create a routine in java that would simulate a user browing the web.
    Ex: A user vistiting a certain page, clicking on a few links etc...
    Is their a java library that can server as a bridge beetween java and internet explorer in order to automate this process.
    Thank you.

    You want to see it all happening on the screen? If so, you could maybe look into IECanvas or some other Java/COM bridge that would let you embed IE in the Java app. I'm not sure what kind of API is available such that would allow for that.
    Another idea is java.awt.Robot which would let you move the mouse and enter text and click on things on any application, but the problem here is that you'd need to know exact coordinates to click on. You could use it to grab screen shots if you can deal with the image manipulation to figure out what is where.

  • How to activate Java Applets?

    Hi,
    I got some Java Applets that i try to run (again). Since Javas own security and firefox itself forbids to run Java without being activated by the user i thought i would be asked whether to activate java on my own site (local on the PC) or not. Although java is activated inside in the plugins-option menu and the correct installation of java is confirmed by java.com (test after the installation) my Java applets dont show up, not even a message saying "Applets are being blocked" or so.
    In chrome i can simply activate the NPAPI in the settings and enable the flag and the applets work. Isnt there a function similar to this?
    I would like to run Firefox portable on a CD to give to students. As the Java applets are being blocked i hoped to simply enable the corrosponding flag so prevent rewriting all the java applets.
    Is there another developer plugin of some sort that i can pre-install into Firefox portable that does the job?
    See blow for Versions of Windows, Firefox. Java Version 8 Update 45 (Build 1.8.0_45-b14) latest version.
    Kind regards,
    Marcel Klinge
    "application": {
    "name": "Firefox",
    "version": "37.0.2",
    "buildID": "20150415140819",
    "userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0",
    "updateChannel": "release",
    "supportURL": "https://support.mozilla.org/1/firefox/37.0.2/WINNT/de/",
    "numTotalWindows": 1,
    "numRemoteWindows": 0
    "crashes": {
    "submitted": [],
    "pending": 0
    "modifiedPreferences": {
    "accessibility.typeaheadfind.flashBar": 0,
    "browser.cache.disk.smart_size.first_run": false,
    "browser.cache.disk.smart_size.enabled": false,
    "browser.cache.disk.capacity": 0,
    "browser.cache.frecency_experiment": 4,
    "browser.places.importBookmarksHTML": false,
    "browser.places.smartBookmarksVersion": 7,
    "browser.search.useDBForOrder": true,
    "browser.sessionstore.upgradeBackup.latestBuildID": "20150415140819",
    "browser.startup.homepage_override.mstone": "37.0.2",
    "browser.startup.homepage": "file:///C:/Users/Klinge/Desktop/Sign%C3%BC%20I+II%20-%20Neu/sueb1/html/index.html",
    "browser.startup.homepage_override.buildID": "20150415140819",
    "dom.ipc.plugins.sandbox.default": true,
    "dom.mozApps.used": true,
    "extensions.lastAppVersion": "37.0.2",
    "gfx.direct3d.last_used_feature_level_idx": 0,
    "media.gmp-gmpopenh264.lastUpdate": 1430384919,
    "media.gmp-gmpopenh264.version": "1.3",
    "media.gmp-manager.lastCheck": 1430384919,
    "network.cookie.prefsMigrated": true,
    "places.database.lastMaintenance": 1430385666,
    "places.history.expiration.transient_current_max_pages": 104858,
    "plugin.importedState": true,
    "plugin.disable_full_page_plugin_for_types": "application/pdf",
    "plugin.state.java": 2,
    "privacy.sanitize.migrateFx3Prefs": true,
    "storage.vacuum.last.places.sqlite": 1430385666,
    "storage.vacuum.last.index": 0
    "lockedPreferences": {},
    "graphics": {
    "numTotalWindows": 1,
    "numAcceleratedWindows": 1,
    "windowLayerManagerType": "Direct3D 11",
    "windowLayerManagerRemote": true,
    "adapterDescription": "ATI Radeon HD 4650",
    "adapterVendorID": "0x1002",
    "adapterDeviceID": "0x9498",
    "adapterSubsysID": "22691787",
    "adapterRAM": "512",
    "adapterDrivers": "atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64",
    "driverVersion": "8.632.1.2000",
    "driverDate": "8-17-2009",
    "adapterDescription2": "",
    "adapterVendorID2": "",
    "adapterDeviceID2": "",
    "adapterSubsysID2": "",
    "adapterRAM2": "",
    "adapterDrivers2": "",
    "driverVersion2": "",
    "driverDate2": "",
    "isGPU2Active": false,
    "direct2DEnabled": true,
    "directWriteEnabled": true,
    "directWriteVersion": "6.2.9200.16571",
    "webglRenderer": "Google Inc. -- ANGLE (ATI Radeon HD 4650 Direct3D11 vs_4_1 ps_4_1)",
    "info": {
    "AzureCanvasBackend": "direct2d 1.1",
    "AzureSkiaAccelerated": 0,
    "AzureFallbackCanvasBackend": "cairo",
    "AzureContentBackend": "direct2d 1.1"
    "javaScript": {
    "incrementalGCEnabled": true
    "accessibility": {
    "isActive": false,
    "forceDisabled": 0
    "libraryVersions": {
    "NSPR": {
    "minVersion": "4.10.8",
    "version": "4.10.8"
    "NSS": {
    "minVersion": "3.17.4 Basic ECC",
    "version": "3.17.4 Basic ECC"
    "NSSUTIL": {
    "minVersion": "3.17.4",
    "version": "3.17.4"
    "NSSSSL": {
    "minVersion": "3.17.4 Basic ECC",
    "version": "3.17.4 Basic ECC"
    "NSSSMIME": {
    "minVersion": "3.17.4 Basic ECC",
    "version": "3.17.4 Basic ECC"
    "userJS": {
    "exists": false
    "extensions": [],
    "experiments": []
    }

    use Robot Class
    java.awt.Robot since jdk1.3

  • Robot class is not working in the remote desktops.

    Hi All,
    Iam using windows o.s, I am trying to run the following sample code in the remote desktop (windows paltform), In my desktop its working fine, but I am not able to run this code in the remote desktops...
    Iam able to control the keyboad in the remote desktops, but am not able to contol the mouse.......
    import java.awt.AWTException;
    import java.awt.Robot;
    public class ClsOne {
         public static void main(String ar[]) throws AWTException{
              Robot r= new Robot();
              r.mouseMove(100, 100);
    }

    Thank u for your answer.
    Yes, of course .. i�ve already apply the unique key validator for the entity.. so that custom error message is the error im trying to get in the application.
    Other issue is when im trying to edit that error message: when im going to edit the message the previous error im entered is not there. Is it normal?

  • Saving Applet display as an image... Java newb

    Hello,
    I'm using wirefusion3D to display and configure 3D objects on a website I've been developing. The only thing it lacks is the ability to save out an image of the current display, which I need to do in order to place those images on a pdf invoice.
    It does, however, have the ability to include custom java code within the applet, so I would like to create a function that will take a snapshot of the current rendered applet display and save that snapshot as a bitmap image on the server. I'm new to Java (I'm a PHP/Javascript guy), and have had no luck finding anything about how this would be done. I'm not really sure what to search for, as I don't really know what java functions/classes deal with this sort of thing.
    I was hoping someone could point me in the right direction.
    Thanks in advance

    1. If all the drawing is taking place in one J/Component, you can construct a BufferedImage, obtain a reference to its associated Graphics and call paint/Component passing the Graphics reference as parameter. Then save the image to a file.
    2. java.awt.Robot#createScreenCapture returns a BufferedImage which is a snapshot of the screen.
    db

  • Strange class error when using java

    I've been attempting to use java.awt.robot to simulate a key press when a button is clicked however I'm getting a couple of errors that I can't figure out but I'm not so good when it comes to scripts. When the button "LetterButton" is pressed it should simulate a keypress, ideally to the desktop/operating sytem but the errors I'm getting are:-
    1071: Syntax error: expected a definition keyword (such as function) after attribute public, not static.
    1084: Syntax error: expecting rightbrace before leftbrace.
    1131: Class must not be nested.
    Here's the code:-
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplicationxmlns:mx="
    http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
    import java.awt.Robot; 
    import java.awt.event.KeyEvent; 
    public class Main { 
    public static void main(String[] argv) throws Exception { 
    Robot robot =
    new Robot(); 
    robot.keyPress(KeyEvent.VK_A);
    robot.keyRelease(KeyEvent.VK_A);
    ]]>
    </mx:Script>
    <mx:VBox x="359" y="262" horizontalCenter="0" verticalCenter="0">
    <mx:Button id="LetterButton" label="Button" click=""/>
    <mx:TextInput id="txt"/>
    </mx:VBox></mx:WindowedApplication>

    Sounds tricky. I may ask them to look for an alternative way of doing it as Java really isn't my thing, I'm merely just a flex beginner at the moment.
    The reason I've been looking for this is that my app will be installed on a digital tv that also has a system connected to it using a Linux operating system so the user can switch between watching digital tv and the application seamlessly and at the moment a Linux professional who I'm working with has the Digital TV bound to the F12 key which is bound to a handheld remote control (being a tv there is no keyboard, just an 'air mouse' and the remote control).
    So my client and my Linux guy have asked me to come up with a way of getting the app to communicate with the desktop/operating system. I have seen flex apps in the past where a user can drag and drop videos on their desktop into an air application from which they will be played so I thought it would be possible to interact with the exteral OS/Desktop from within an AIR app by using just flex but it doesn't seem so easy through my research.
    Thanks for your help though.

  • Robot screen capture problem on Mac os 10

    Dear all,
    I perform a screen capture with jframe size.The background capture is ok but i have a line border around the rectangle determined by the capture and a shadow in capture background..
    How to remove the line border of capture, and suppress the shadow on mac ....
    Thanks in advance for all helps..
    package nomadsland.splashWindow;
    import java.awt.AWTException;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.Robot;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.BufferedImage;
    import java.awt.image.ConvolveOp;
    import java.awt.image.Kernel;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JWindow;
    import javax.swing.Timer;
    public class ShadowedWindow extends JWindow {
        private BufferedImage splash = null;
        public ShadowedWindow(BufferedImage image) {
            createShadowPicture(image);
        public void paint(Graphics g) {
            if (splash != null) {
                g.drawImage(splash, 0, 0, null);
        private void createShadowPicture(BufferedImage image) {
            int width = image.getWidth();
            int height = image.getHeight();
            int extra = 14;
            setSize(new Dimension(width + extra, height + extra));
            setLocationRelativeTo(null);
            Rectangle windowRect = getBounds();
            splash = new BufferedImage(width + extra, height + extra, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g2 = (Graphics2D) splash.getGraphics();
            try {
                Robot robot = new Robot(getGraphicsConfiguration().getDevice());
                BufferedImage capture = robot.createScreenCapture(new Rectangle(windowRect.x, windowRect.y, windowRect.width + extra, windowRect.height + extra));
                g2.drawImage(capture, null, 0, 0);
            } catch (AWTException e) { }
            BufferedImage shadow = new BufferedImage(width + extra, height + extra, BufferedImage.TYPE_INT_ARGB);
            Graphics g = shadow.getGraphics();
            g.setColor(new Color(0.0f, 0.0f, 0.0f, 0.3f));
            g.fillRoundRect(6, 6, width, height, 12, 12);
            g2.drawImage(shadow, getBlurOp(7), 0, 0);
            g2.drawImage(image, 0, 0, this);
        private ConvolveOp getBlurOp(int size) {
            float[] data = new float[size * size];
            float value = 1 / (float) (size * size);
            for (int i = 0; i < data.length; i++) {
                data[i] = value;
            return new ConvolveOp(new Kernel(size, size, data));
        public static void main(String[] args) {
            try {
                 BufferedImage image = ImageIO.read(ShadowedWindow.class.getResourceAsStream("loginPanelGeneric.png"));
                ShadowedWindow window = new ShadowedWindow(image);
                window.setVisible(true);
                Timer timer = new Timer(5000, new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        System.exit(0);
                timer.start();
            } catch (IOException e) {
                e.printStackTrace();
    }Thanks you in advance for any help...

    Dear all,
    I perform a screen capture with jframe size.The background capture is ok but i have a line border around the rectangle determined by the capture and a shadow in capture background..
    How to remove the line border of capture, and suppress the shadow on mac ....
    Thanks in advance for all helps..
    package nomadsland.splashWindow;
    import java.awt.AWTException;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.Robot;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.BufferedImage;
    import java.awt.image.ConvolveOp;
    import java.awt.image.Kernel;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JWindow;
    import javax.swing.Timer;
    public class ShadowedWindow extends JWindow {
        private BufferedImage splash = null;
        public ShadowedWindow(BufferedImage image) {
            createShadowPicture(image);
        public void paint(Graphics g) {
            if (splash != null) {
                g.drawImage(splash, 0, 0, null);
        private void createShadowPicture(BufferedImage image) {
            int width = image.getWidth();
            int height = image.getHeight();
            int extra = 14;
            setSize(new Dimension(width + extra, height + extra));
            setLocationRelativeTo(null);
            Rectangle windowRect = getBounds();
            splash = new BufferedImage(width + extra, height + extra, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g2 = (Graphics2D) splash.getGraphics();
            try {
                Robot robot = new Robot(getGraphicsConfiguration().getDevice());
                BufferedImage capture = robot.createScreenCapture(new Rectangle(windowRect.x, windowRect.y, windowRect.width + extra, windowRect.height + extra));
                g2.drawImage(capture, null, 0, 0);
            } catch (AWTException e) { }
            BufferedImage shadow = new BufferedImage(width + extra, height + extra, BufferedImage.TYPE_INT_ARGB);
            Graphics g = shadow.getGraphics();
            g.setColor(new Color(0.0f, 0.0f, 0.0f, 0.3f));
            g.fillRoundRect(6, 6, width, height, 12, 12);
            g2.drawImage(shadow, getBlurOp(7), 0, 0);
            g2.drawImage(image, 0, 0, this);
        private ConvolveOp getBlurOp(int size) {
            float[] data = new float[size * size];
            float value = 1 / (float) (size * size);
            for (int i = 0; i < data.length; i++) {
                data[i] = value;
            return new ConvolveOp(new Kernel(size, size, data));
        public static void main(String[] args) {
            try {
                 BufferedImage image = ImageIO.read(ShadowedWindow.class.getResourceAsStream("loginPanelGeneric.png"));
                ShadowedWindow window = new ShadowedWindow(image);
                window.setVisible(true);
                Timer timer = new Timer(5000, new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        System.exit(0);
                timer.start();
            } catch (IOException e) {
                e.printStackTrace();
    }Thanks you in advance for any help...

  • Java Applets and Executing Files

    Hi I have written an applet that pops up when accessing a URL. I am trying to run an executable file from a button press in the applet. The executable is stored localy on my machine but I can not seem to acceess the executable.
    Any Ideas??
    Cheers JJ

    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Robot.html

  • Robot Test fails  with error message Invalid command line: process must be

    public class test
        public static void main(String [] args) throws Exception
            new java.awt.Robot();
    }I'm using SLES Linux.
    Is there any problem in my machine ?
    How Robot tests generally works ?
    Thanks !

    try:
    public class test{
        public static void main(String [] args) {
            try{
               java.awt.Robot myRobot = new java.awt.Robot();
            }catch(Exception e){
              System.out.println("It didn't work");
    }from the API:
    Note that some platforms require special privileges or extensions to access low-level input control. If the current platform configuration does not allow input control, an AWTException will be thrown when trying to construct Robot objects. For example, X-Window systems will throw the exception if the XTEST 2.2 standard extension is not supported (or not enabled) by the X server.

  • Java 7 TitledBorder getTitleColor returns null

    With java 1.7.0_03, the method getTitleColor() in class javax.swing.border.TitledBorder returns null. It didn't with java 1.5 or 1.6. Is this change in functionality a bug? If not, is the best way to handle it really to go through my code and add 'UIManager.getColor("TitledBorder.titleColor")' everywhere getTitleColor() returns null? The UIManager call appears to be the code Oracle took out of TitledBorder in java 7.
    Thanks,
    Mike

    The following code returned an object in java 1.5 and 1.6, but in 1.7 it returns null.
    package test;
    public class MyTitleColor{
    public static void main(String[] args){
    System.out.println(new javax.swing.border.TitledBorder("new").getTitleColor());
    The output in 1.5 and 1.6 is:
    sun.swing.PrintColorUIResource[r=51,g=51,b=51]
    but in 1.7 it is:
    null
    I'm pretty sure this is a regression, so it looks like my next stop is the java bug reporting maze.

  • Best Way to Implement Java Onscreen Keyboard Input

    Hello!
    I'm working on an embedded device that will run J2SE, using a touchscreen, but no keyboard. The UI will be in Swing. When the user focuses a text field, I'd like an on-screen keyboard to be displayed.
    My question is as to the best way to have Swing text component receive the key events (?) that this keyboard will generate. The options I saw so far are
    1. Write an input method provider
    2. Use java.awt.Robot
    But I think I might be missing some easier way.
    Thanks for advice, or pointing me to an existing project.
    ~Jesse

    Thanks for the idea! It sounds quite a bit simpler.
    So basically, I'll attach a focus listener to each of my text components, and when one receives focus it will
    1. Display the keyboard on screen
    2. Pass its document and caret to the keyboard class.
    When the user "types" on the keyboard, it will modify the Document and Caret appropriately. I assume all Swing text components listen for document changes - so this should work nicely.
    Best,
    Jesse

Maybe you are looking for

  • Music drop outs / stutter when listening to MP3s or Internet Radio with Verizon Media Manager

    Does anybody know when I play MP3s or listen to Internet Radio I'm getting slight drop out or stutter? I just downloaded and installed the Verizon Media Manager on a machine running Windows 7. Any help would be appreciated.

  • TS1424 How do I complain about a charge in my account?

    I got a repeated charge for an app, and I am trying to contact someone to report this complaint, but the system keeps me going in circles. How do I communicate directly with the billing department?

  • Uploading/intergating Lightroom page to iweb / dotmac site

    Hello http://discussions.apple.com/thread.jspa?threadID=1318450&tstart=0 http://blogs.adobe.com/lightroomjournal/2007/03/how_do_you_upload_to_mac_dot_m_1.html http://discussions.apple.com/thread.jspa?threadID=1280597&tstart=0#6160586 All of these ans

  • Suitcase Ver 3 or 4

    I recently was notified by Apple that my Mac had a faulty hard drive and needed to be replaced by Apple at not charge. I have a Time Machine and my drive was backed up. I had the latest system softwre installed. When I got the computer back and ran r

  • Importing iWeb files from one computer to another

    I have created a new website on my laptop and have my other sites on my desktop and want to transfer the site on my laptop to my desktop. I don't see where we can import files from one computer's files to another computer's files. Is there a way to d