How to setup JAWS for Java Swing applications

Hello All,
I am having one swing application and need to test with JAWS.Could you please let me know the configuration steps.I tried with the following steps and it is not working properly.
1. Install JDK1.5.0_08
2. Install JAWS 7.0
3. Install SUN accessbridge-2_0_1
4. Copied access-bridge, jaccess-1_4 and to jre\lib\ext
it is not identifying even buttons also.
Thanks & Regards,

Hello there,
Gana, Ana
I have the same problem
1. Install JDK1.5.0_08
2. Install JAWS 7.0
3. Install SUN accessbridge-2_0_1
4. Copied access-bridge, jaccess-1_4 and to jre\lib\ext
and nothing

Similar Messages

  • Accelarate the Linux ATI Graphics card  for java Swing application

    Hi All,
    I am using a ATI Radeon 9550 Graphic card in LFS (Linux from the scratch) environment. I want to enable the OpenGL-based pipeline for Java Swing application. I tried the -Dsun.java2d.opengl=true . But the Java swing application getting very slow.
    How to overcome this problem?
    Any one give the procedure to Accelerate ATI graphics card for Java Swing Application
    How to verify Java swing use ATI graphics card ?
    Thanks in advance..

    Hi All,
    I am using a ATI Radeon 9550 Graphic card in LFS (Linux from the scratch) environment. I want to enable the OpenGL-based pipeline for Java Swing application. I tried the -Dsun.java2d.opengl=true . But the Java swing application getting very slow.
    How to overcome this problem?
    Any one give the procedure to Accelerate ATI graphics card for Java Swing Application
    How to verify Java swing use ATI graphics card ?
    Thanks in advance..

  • Design Patterns for java swing application front a J2EE server

    i dont nkow that i stay in the correct forum. I am development a java swing client application, no web, and i dont know that if there are any patterns for a client of this type.
    I have readed
    but after of Buissnes Delegate pattern, the others one, over ejb tier, are applicated only for web clients, using servlets and jsp pages.
    If i have a swing client application, what patterns i must folow for implement the client logic of my swing application??

    MVC pattern is one of the most used

  • How to disable html for whole swing application.

    As we can disable html for individual swing components , for example JLabel
    is there any way to disable html rendering in swing components for system wide / whole application?.

    Better use a utility method in the application like this
    public static void disableHtml(JComponent component)
    call disableHtml(Component u want to set html disable) for any component in the application.

  • How to setup Proxy for Java Web Start App ?

    I'm having trouble getting Java Web Start to work.
    It tell me...
    To test whether your browser can launch an application using Java Web Start, click this link.
    I do that & see Java Web Start try to start but get message...
    Java Web Start - Invalid Argument
    Unable to launch specified application
    An error occurred while launching/running the application.
    Category: Invalid Argument error
    Could not load file/URL specified: C:\Documents and Settings\Will\Local Settings\Temporary Internet Files\Content.IE5\OP8RSBCV\HelloJWS[1].jnlp
    Then... tells me...
    "This situation usually happens when your browser and your copy of Java Web Start have different proxy settings."
    I click Start | Programs | Java Web Start | Java Web Start,,, then click File | Preferences | General
    My choices are... Proxies: None   User Browser _ Manual (User Browser grayed out)
    If _ Manual checked then I get...
    HTTP Proxy ______
    HTTP Port _______
    I'm running XP Pro via Wi Fi to a Linksys Wi Fi router to a cable modem... I'm also running Zone Alarm (tried turning it off but no luck)
    I don't know how to set up the Proxy stuff... can any one please help me get this set up.
    thanks - Will

    OK, on my XP Pro system I went to...
    Start IE -> Control Panel -> Internet Options -> Connections -> Lan Settings -> Proxy Settings
    This is my 'Local Area network (LAN) Settings panel...
    - user Proxy server for LAN is checked
    - Address is blank
    - Port is blank
    So do I plug something in here... the ip address of my linksys wi-fi router and a port number or what?
    My Java Web Start Preferences won't let me click 'Use Browser' only None or Manual
    If I click Manual, I don't know what to plug into the HTTP Proxy and HTTP Port fields...
    I tried the ip address of my router... thinking it may have a built in Proxy Server... and port 8080 as indicated by the Help page for the Java Web Start... but no luck.
    I really appriceate any help on this...
    thanks - Will

  • How many softwares are there to create a setup file for java programs

    Hi, i am new to java
    I want to know how many softwares are there to create a setup file for java programs.
    I know one software i.e java launcher to create a setup file.
    I want to know about any other softwares are available to create a setup file for java programs.
    I created a setup file for swings program in JCreator.
    And don't think that i am wastiing ur time with this question .
    Help me regarding this topic.
    Thanks in Advance

    superstar wrote:
    I want to know how many softwares are there to create a setup file for java programs.13, no wait, 42.
    I know one software i.e java launcher to create a setup file.You should clearly identify what you think you already know.
    I want to know about any other softwares are available to create a setup file for java programs.
    I created a setup file for swings program in JCreator.Is this the one you talked before, or is this different?
    And don't think that i am wasting ur time with this question .Why should I not think that?

  • How to create the digital clock in java swing application ?

    I want to create the running digital clock in my java swing application. Can someone throw some light on this how to do this ? Or If someone has done it then can someone pl. paste the code ?

    hi prah_Rich,
    I have created a digital clock you can use. You will most likely have to change some things to use it in another app although that shouldn't be too hard. A least it can give you some ideas on how to create one of your own. There are three classes.One that creates the numbers. a gui class and frame class.
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.geom.*;
    public class DigitalClock extends Panel{
              BasicStroke stroke = new BasicStroke(4,BasicStroke.CAP_ROUND,
              String hour1, hour2;
              String minute1, minute2;
              String second1, second2;
              String mill1, mill2, mill3;
              int hr1, hr2;
              int min1, min2;
              int sec1, sec2;
              int mll1, mll2,mll3;       
        public void update(Graphics g){
         public void paint(Graphics g){
              Graphics2D g2D = (Graphics2D)g;
              DigitalNumber num = new DigitalNumber(10,10,20,Color.cyan,;     
              GregorianCalendar c = new GregorianCalendar();
              String hour = String.valueOf(c.get(Calendar.HOUR));
              String minute = String.valueOf(c.get(Calendar.MINUTE));
              String second = String.valueOf(c.get(Calendar.SECOND));
              String milliSecond = String.valueOf(c.get(Calendar.MILLISECOND));
                   hour1 = hour.substring(0,1);
                   hour2 = hour.substring(1,2);
                   hour1 = "0";
                   hour2 = hour.substring(0,1);
                   minute1 = minute.substring(0,1);
                   minute2 = minute.substring(1,2);
                   minute1 = "0";
                   minute2 = minute.substring(0,1);
                   second1 = second.substring(0,1);
                   second2 = second.substring(1,2);
                   second1 = "0";
                   second2 = second.substring(0,1);
                   mill1 = milliSecond.substring(0,1);
                   mill2 = milliSecond.substring(1,2);
                   mill3 = milliSecond.substring(2,3);
              }else if(milliSecond.length()==2){
                   mill1 = "0";
                   mill2 = milliSecond.substring(0,1);
                   mill3 = milliSecond.substring(1,2);
                   mill1 = "0";
                   mill2 = "0";
                   mill3 = milliSecond.substring(0,1);
              hr1  = Integer.parseInt(hour1);     
              hr2  = Integer.parseInt(hour2);
              min1 = Integer.parseInt(minute1);
              min2 = Integer.parseInt(minute2);
              sec1 = Integer.parseInt(second1);
              sec2 = Integer.parseInt(second2);
              mll1 = Integer.parseInt(mill1);
              mll2 = Integer.parseInt(mill2);
                   if(!(hr1 == 0)){     
         String dayOfweek = "";     
                   dayOfweek = "Sunday, ";
                   dayOfweek = "Monday, ";
                   dayOfweek = "Tuesday, ";
                   dayOfweek = "Wednesday, ";
                   dayOfweek = "Thursday, ";
                   dayOfweek = "Friday, ";
                   dayOfweek = "Saturday, ";
         String month = "";     
                   month = "January ";
                   month = "February ";
                   month = "March ";
                   month = "April ";
                   month = "May ";
                   month = "June ";
                   month = "July ";
                   month = "August ";
                   month = "September ";
                   month = "October ";
                   month = "November ";
                   month = "December ";
         int day = c.get(Calendar.DAY_OF_MONTH);
         int year = c.get(Calendar.YEAR);
         Font font = new Font("serif",Font.PLAIN,24);
         g2D.drawString(dayOfweek+month+day+", "+year,10,80);
         public static void main(String args[]){
              AppFrame aframe = new AppFrame("Digital Clock");
              Container cpane = aframe.getContentPane();
              final DigitalClock dc = new DigitalClock();
              class Task extends TimerTask {
                 public void run() {
              java.util.Timer timer = new java.util.Timer();
             timer.schedule(new Task(),0L,250L);
    class DigitalNumber {
         private float x=0;
         private float y=0;
         private float size=5;
         private int number;
         private Shape s;
         private float space = 0;
         public static final int DOTS = 10;
         private Color on,off;
         DigitalNumber(float x,float y, float size,Color on,Color off){
              this.x = x;
              this.y = y;
              this.size = size;
              this.on = on;
     = off;
         public void drawNumber(int number,Graphics2D g){
              int flag = 0;
                        flag = 125;
                        flag = 96;
                        flag = 55;
                        flag = 103;
                        flag = 106;
                        flag = 79;
                        flag = 94;
                        flag = 97;
                        flag = 127;
                        flag = 107;
                        GeneralPath path = new GeneralPath();
              if((flag & 1) == 1){
              GeneralPath Top = new GeneralPath();
              Top.moveTo(x + space, y);
              Top.lineTo(x + size - space, y);
              if((flag & 2) == 2){
              GeneralPath Middle = new GeneralPath();
              Middle.moveTo(x + space, y + size); 
              Middle.lineTo(x + size - space,y + size);     
              if((flag & 4) == 4){
              GeneralPath Bottom = new GeneralPath();
              Bottom.moveTo(x + space, y + (size * 2));  
              Bottom.lineTo(x + size - space, y + (size * 2));
              if((flag & 8) == 8){
              GeneralPath TopLeft = new GeneralPath();     
              TopLeft.moveTo(x, y + space);
              TopLeft.lineTo(x, y + size - space);          
              if((flag & 16) == 16){
              GeneralPath BottomLeft = new GeneralPath();     
              BottomLeft.moveTo(x, y + size + space);
              BottomLeft.lineTo(x, y + (size * 2) - space);
              if((flag & 32) == 32){
              GeneralPath TopRight = new GeneralPath();     
              TopRight.moveTo(x + size, y + space);
              TopRight.lineTo(x + size, y + size - space);
              if((flag & 64) == 64){
              GeneralPath BottomRight = new GeneralPath();     
              BottomRight.moveTo(x + size, y + size + space);
              BottomRight.lineTo(x + size, y + (size * 2) - space);
         public void setSpacing(boolean spacingOn){
              if(spacingOn == false){
                   space = 0;
         public void setSpacing(boolean spacingOn,float gap){
                   gap = 2;
              if(spacingOn == true){
                   space = size/gap;
         public void setLocation(float x,float y){
              this.x = x;
              this.y = y;
         public void setSize(float size){
              this.size = size;
    class AppFrame extends JFrame{
              this("Demo Frame");
         AppFrame(String title){

  • How can I unit test my Swing application?

    Hi All,
    In my application I came across a situation where I have to automate the unit testing of my application.
    Using my application user can able to draw polylines and rectangles on a BufferedImage added to a JFrame.
    Can any one please help/suggest me, how to automate the drawing process (this process consists of drawing the polylines with mouse and few action/mouse events)?
    your help will be highly helpful to me.

    What exactly will that unit test prove? That you can mock the drawing of lines?
    Unit test are supposed to test certain parts of your application code - I'd concentrate on unit tests that are actually useful and for example in the future can help to catch regressions.
    If anywhere you can get help creating unit tests of this magnitude, I'd look in the unit testing support for Swing applications. Google for "java swing unit test" to see what you can come up with. Probably you'll need to create some plumbing yourself to make custom painting unit-testable; perhaps you could do something with painting to a BufferedImage in stead of to a Swing component for example.

  • Unicode characters with accents won't display in Java Swing applications

    I'm using FreeMind (a Java Swing application) and I need to enter classical Greek characters with accent marks. When I type an accented Greek character, FreeMind displays the unaccented character. However, I can type the accented character in MS Word, then copy and paste into FreeMind, the accented character appears.
    One of the FreeMind developers indicated this was a Java Swing issue, not FreeMind, and suggested I test with another Swing application. So, I installed jEdit and got exactly the same results. I can paste an accented character into jEdit, but I cannot type it in directly.
    I'm using Windows Vista with Java 6 Update 22 (build 1.6.0_22-b04). I also tested on a XP Pro box with Java 1.6.0_18-b07 and got the same result.
    One other note: A couple days ago, I was able to type accented Greek characters into FreeMind. But it only worked for a couple days and then the behavior reverted to unaccented characters. It is possible, but I don't recall specifically, that I updated Java during the time and that may indicate a bug in one version of Java but not another.
    Any assistance or guidance would be greatly appreciated!

    The link you provided does not appear to describe the Greek Polytonic keyboard. (The page also describes using the "Option" key as the dead key. There is no "Option" key on my keyboard. I'm using a Sony VGN-NS140E purchased in Chicago, i.e. standard physical US keyboard.)
    Please see for a detailed description of how to use the Greek (Polytonic) keyboard in Windows to produce a complete set of accented classical Greek characters. This method works in MS Word and Notepad. I enabled the Greek (Polytonic) keyboard with:
    Windows (Vista) Start > Control Panel > Regional and Language Options > Change Keyboards > General > Add > Greek (Greece) > Greek Polytonic
    A test that will demonstrate whether you can replicate the error is to do the following in both MS Word (or Notepad) and jEdit (or FreeMind):
    1. Enable the Greek Polytonic keyboard
    2. Type "\" then "e" which should produce an epsilon with smooth breathing and grave accent (ἒ)
    When I do this in MS Word or Notepad, I see the epsilon with smooth breathing and grave accent. When I do this in jEdit and FreeMind, I only see an epsilon.
    I recorded a screencast to illustrate the problem:
    Actually, this problem is transient. Sometimes FreeMind or jEdit will display accented characters, other times it won't. Ironically, the first time I recorded the above referenced screencast, a few characters in jEdit did appear with accents. A couple minutes later, I re-recorded the screencast and as you can see jEdit did not display the accents. Between the two recordings I literally did nothing other than stop the Jing recording and start a new one. There is another variable at play here and I can't determine what it is. The most likely source seems to be Java since MS Word and Notepad consistently display accent characters.

  • BackGround picture for a Swing application??

    once I got a nice idea while watching some webpages. we can give a background picture for a webpage in <body> tag?
    I want to do same thing for any Swing application. Currently I am working on that issue. Any suggestions are welcome!!

    Hi everybody!
    Finally I got it. now Using this We can enable background for any swing application.
    the complete code is shown here. If you have any problems regarding this code, please mail to [email protected]
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    /* this is used to generate a tiled image from a given image file.*/
    public class TexturedImageIcon extends ImageIcon
         private Dimension size = new Dimension(10, 10);
         BufferedImage bimg1,bimg;
         Graphics2D g2;
         ComponentListener cl = new ComponentAdapter(){
              public void componentResized(ComponentEvent ce){
                   Component c = (Component)ce.getSource();
                   size = c.getSize();
         public void setImage(String filename){
              super.setImage(new ImageIcon(filename).getImage());
         public TexturedImageIcon(Component comp, Image img){
         public TexturedImageIcon(Component comp, String filename){
         public TexturedImageIcon(Component comp, URL url){
         private void addListener(Component comp){
         private void createImage(){
              bimg = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
              g2 = bimg.createGraphics();
              Rectangle2D rect = new Rectangle2D.Float(0,0,size.width-1, size.height-1);
              Rectangle2D tr = new Rectangle2D.Double(0,0,super.getIconWidth(), super.getIconHeight());
                   bimg1 = new BufferedImage(super.getIconWidth(), super.getIconHeight(), BufferedImage.TYPE_INT_RGB);
                   Graphics2D g = bimg1.createGraphics();
                   g.drawImage(super.getImage(), null, null);
              TexturePaint tp = new TexturePaint(bimg1, tr);
         public int getIconWidth(){ return size.width; }
         public int getIconHeight(){ return size.height; }
         public Image getImage(){
              return bimg;
         public void paintIcon(Component c, Graphics g, int x, int y){
              Graphics2D g2d =(Graphics2D)g;
              g2d.drawImage(bimg, null, null);
         public static void main(String[] args){
              JFrame f = new JFrame();
              JLabel label = new JLabel();
              label.setIcon(new TexturedImageIcon(label, "world2.gif"));
              f.getContentPane().setLayout(new BorderLayout());
              f.getContentPane().add(label, BorderLayout.CENTER);
    /*The main logic to enable background picture lies in this class*/
    public class JFCUtils{
         public static ContainerListener cl = new ContainerAdapter(){
              public void componentAdded(ContainerEvent ce){
                   JComponent child = (JComponent)ce.getChild();
         public static TexturedImageIcon enableBackGround(JFrame f, String filename){
              JLayeredPane lp = f.getLayeredPane();
              JLabel label = new JLabel();
              TexturedImageIcon icon = new TexturedImageIcon(label, filename);
              JPanel panel = new JPanel(new BorderLayout());
              panel.add(label, BorderLayout.CENTER);
              lp.add(panel, new Integer(Integer.MIN_VALUE));
              Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
              panel.setBounds(0, 0, screen.width,screen.height);
              return icon;
         private static void addlisteners(Component c){
              if(c instanceof JComponent) ((JComponent)c).setOpaque(false);
              if(c instanceof Container){
                   Container ct = (Container)c;
              for(int i=0; i<ct.getComponentCount(); i++){ //recursivly make all subcomponents transparent
                   Component child = (Component)ct.getComponent(i);
         public static void main(String[] args){
              JFrame f = new JFrame();
              enableBackGround(f, "bg.jpg");
              JButton b = new JButton("fdfdfdfd");
              f.getContentPane().add(b, BorderLayout.NORTH);
    //to check how a swing application with background looks like
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class UserDialog extends JDialog
         JPanel contents = (JPanel)getContentPane();
         JTextField shortField = new JTextField(20);
         JTextField nameField = new JTextField(20);
         JTextField emailField = new JTextField(20);
         JTextField smtpServerField = new JTextField(20);
         JTextField pwdField = new JPasswordField(20);
         JTextField pwdField1 = new JPasswordField(20);
         boolean okay = false;
         public UserDialog(JFrame owner){
              super(owner, "New User Details", true);
         public UserDialog(JDialog owner){
              super(owner, "New User Details", true);
         private void initComponents(){
              JPanel west = new JPanel(new GridLayout(0, 1));
              west.add(new JLabel("Short Name"));
              west.add(new JLabel("Full Name"));
              west.add(new JLabel("Email"));
              west.add(new JLabel("SMTP Server"));
              west.add(new JLabel("Password"));
              west.add(new JLabel("Confirm Password"));
              JPanel east = new JPanel(new GridLayout(0, 1));
              JPanel south = new JPanel();
              JButton ok = new JButton("Ok");
              JButton cancel = new JButton("Cancel");
              contents.setLayout(new BorderLayout(10, 10));
              contents.add(west, BorderLayout.WEST);
              contents.add(east, BorderLayout.EAST);
              contents.add(south, BorderLayout.SOUTH);
              ActionListener al = new ActionListener(){
                   public void actionPerformed(ActionEvent ae){
                        okay = ae.getActionCommand().equals("Ok");
         private void clearFields(){
         public User getUser(){
              okay = false;
              if(okay) return new User(shortField.getText(), nameField.getText(), emailField.getText(), smtpServerField.getText(), pwdField.getText());
              else return null;
         public static void main(String[] args){
              Dialog dlg = new UserDialog();
              TexturedImageIcon ticon = JFCUtils.enableBackGround(f, "bg.jpg");.show();
              //we can change the background picture by calling ticon.setImage(...) at runtime.

  • Book Recommendation for Building Swing Applications

    I'm looking for recommendations on books for building swing applications from the ground up.
    I'm not a strong GUI developer. 95% of my experience has been strictly on back end development in many other languages. What little GUI experience I have has been with C++ (years ago) and most recently with HTML.
    I know what I want to develop, and even have the GUI design for my application drawn out. I just need a good book that can walk me through developing the interface in Java.
    I already have several books on Java. But, I find them somewhat limiting because they don't help me build the app from the ground up.
    Yes, I've tried the online book on the Sun site, "The Jfc Swing Tutorial: Guide to Constructing Gui's".
    Please offer some recommendations and reasons on why you like the book.

    A few comments to that ....
    the first thing is understanding the LayoutManagers, that are available.
    I will give you a short guideline where they are usefull:
    FlowLayout - usefull for JLabel-JTextField combinations or several JButtons
    BorderLayout - usefull for the structure of basic containers
    CardLayout - usefull for every area of the screen, where you want to appear different panels
    GridLayout - usefull for a group of same-sized components laid out in a grid
    GridBagLayout - usefull for a group of components, that have different sizes, very flexible
    JTabbedPane - a special container, that is similar to CardLayout but with visible tabs to switch panels
    Normally you can say "I want that group at the bottom of the frame, that other group at its left side, that toolbar at its top" - if you can say so - that shouts for BorderLayout. If you can say "in this area I want to use several panels" that means CardLayout or a JTabbedPane.
    You see, if you have an idea, what the LayoutManagers do, you know exactly which area needs what Layout - so you have a guideline, which LayoutManager to use in that panel.
    To make an example:
    You want 3 buttons centered at the bottom of a frame - this 3 buttoms should be of that size, that is needed by the button texts. So, what to do:
    1. create a JPanel with FlowLayout
    2. create the buttons and add it to that JPanel
    3. create another JPanel with BorderLayout
    4. add that first JPanel to the second JPanel at BorderLayout.CENTER
    5. add this Panel to the ContentPane of the frame at BorderLayout.SOUTH
    that is a simple panel in panel construct - placing 3 buttons centered at the bottom of the frame. You have to play with that different LayoutManagers a little bit - the way you stick one panel in another changes the look of the GUI - if you know, how it changes (by playing with the examples of the tutorial), you will have that "from the ground"-experience, you are looking for - believe me.
    greetings Marsian

  • Certificate support in Java Swing application

    Hi There,
    I am new to this Certificate thing and running into issues! Would appreciate for all the help and please ignore for any stupid questions.
    Here is my scenario.
    1. I do have a client server application and client is a java swing application which connects to a Server application (Using Jetty 4.2.22 as embedded server)
    2. Initially, it had a self signed certificate but goal is to support third party certificate (i.e import in the server and then show warning to the client during login)
    If somebody has already done this or point me to some example (using Jetty APIs) that would be great help. If not, here is what I am trying to do and some questions.
    1. I tried to get some free SSL certificate from the web and imported into the server's KeyStore.
    If I do a list from the server using Keystore, this is what it looks like
    keytool -list -keystore /tmp/keystore -storepass genview
    Keystore type: JKS
    Keystore provider: SUN
    Your keystore contains 2 entries
    self, Dec 3, 2008, PrivateKeyEntry,
    Certificate fingerprint (MD5): 0D:58:E8:77:89:09:F8:2B:37:64:37:D5:03:AD:C9:0B
    rapid, Jan 6, 2009, trustedCertEntry,
    Certificate fingerprint (MD5): 64:9C:EF:2E:44:FC:C6:8F:52:07:D0:51:73:8F:CB:3
    QUESTION 1 : why the third party certificate's entry as "trustedCertEntry"? Is it always like this? Do I need to have only one certificate at a time? (If so, just remove the self signed and have 3rd party one)
    My Jetty server comes up but when I connect from Client Swing App, the "getServerCertificates()" method only returns one entry i.e self signed one but not the third party one.
    I am using like this
    URL url = new URL("");
    HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
    Certificate[] certs = conn.getServerCertificates();
    Is not this API supposed to return all the server's certificate?
    Please guide me or instruct me what to do.

    Crossposted and answered.

  • Invoking a Java swing application via its process id

    I have a Java swing application. What i am trying to do here is that when the user double-clicks the jar file to open it, if the Swing application is already open and is minimized, I need to maximize the open window and make it active.
    I tried using 'jps -l' command in my new instance, and with the help of Runtime.exec() am able to detect whether the application is already running or not, and if running, am able to get the process id and am displaying a message to user indicating the window is already open.
    But how do i maximize the window of an already running application? Is it possible?

    user13333704 wrote:
    I have a Java swing application. What i am trying to do here is that when the user double-clicks the jar file to open it, if the Swing application is already open and is minimized, I need to maximize the open window and make it active. That's not hard to do, but your proposed solution is hard to do. The usual way to have only one instance of a Java application running is this:
    Have the application open a SocketServer on a certain port number. Since only one process can listen on a port, the second instance of the application will fail when it tries to open the SocketServer. When that happens, the second instance should terminate instead of displaying its own GUI. Whether it terminates silently or whether it displays a dialog is up to you.
    If you want the second instance to communicate with the first instance, that's easy because the first instance is listening on the port. So the second instance could connect to that port and send a message to it. In your case the first instance would respond to that message by maximizing its GUI.

  • Viewing and printing a PDF file from Java Swing Application

    I need to view and print PDF files from Java Swing Application.How do I do that?I appreciate your help.
    Thank you
    Sumana Somareddy

    If you have a link to the URL pointing to the PDF file, you can allow the browser to open it. Then use the print function of the browser to print the PDF document.

  • How to embed/perform a Java Swing form into webased Swing form

    How to embed/perform a Java Swing form into webased Swing form or any alternative.
    Suppose i have 2 or more swing forms which are desktop applications but i want those forms to be now how can i do this.Will i need to change the swing coding or will have to keep the swing design same.what can be the best Solution.

    You can launch your existing desktop app via the web using [Java Web Start|]

Maybe you are looking for

  • Strange things happen when printing

    when I print I have what seems to be some random faded 'boxes' appear in the background. They seem to be related to elements which have a drop shadow or transparency applied to them. I have changed 'All Spots to Process' in the ink manager as that fi

  • Itunes 10.1 iphone problems

    i got the iphone 3gs and im having problems. i downloaded the new itunes update and now im trying to put music on my iphone and when i plug it in the only thing that pops up is the camera. so i dont know if its just mine or anyone elses and if anyone

  • Authentication falure 5440, ISE

    Hi, Trying to authenticate Windows Vista computers with machine certificate and EAP-TLS on the wired network. Sometimes one or two computers fail the authentication when it boot and it is not allways the same computers. On the wireless network everyt

  • Servlet.service() Error. java.lang.OutOfMemoryError: Java heap space

    Hi All, I would be very grateful if you would draw some light for this error I got from running a online database connected image viewer (applet). The application is quite simple, applet connect to servlet, servlet send 3 SQL statements to MySQL and

  • Illustrator CC 2014 & Catia V5 DXF/DWG problem

    Hello, I have a problem. I need to export somehow from Illustrator  some drawings and open it in Catia V5. It shouldn't be a problem, but I lose sometimes 1/10 millimeters, and have to work with a very small tolerance. And as you can see some curves