Does swing application run on android?

Hi we have developed a swing application for desktop. does it run on android OS as it is? The Android doc says it supports java. The swing app was developed on runtime 1.6 and the targeted Android Os is 2.3.6.

No. Android API and Java API overlap a lot, but they differ mainly when it comes to UI. To answer yourself this kind of questions, open the Android API reference page and check what is left there from AWT and Swing. Not much.

Similar Messages

  • Javaw does not work for my SWING application

    Dear all,
    I try to use 'javaw ClassName' (from a batch test.bat) to hide command prompt window when a Swing application starts. Unfortunately, the CMD still appears. So I recommend the command java and javaw has no difference in my situation.
    I use jdk1.6.0_02 runs on Windows XP Prof Service Pack 2.
    Could anyone give me some hint please?
    Regards,
    Byron
    The Swing code is attached
    import java.awt.*;
    import javax.swing.*;
    public class Reminder extends JFrame
         public static void main(String[] args)
              new Reminder();
         public Reminder()
              super("Reminder");
              JDesktopPane desktop = new JDesktopPane();
    this.setContentPane(desktop);
    this.setLocation(350, 300);
    this.setSize(300, 80);
    this.setResizable(false);
    JLabel reminder = new JLabel("Do not forget delivering reports!", SwingConstants.CENTER);
    reminder.setForeground(new Color(125, 125, 220));
    reminder.setFont(new Font("SansSerif", Font.BOLD, 18));
         this.getContentPane().setLayout(new BorderLayout());
         this.getContentPane().add("Center", reminder);
         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// set frame closeable
    //     this.setExtendedState(JFrame.MAXIMIZED_BOTH);// set maximized frame
              this.setVisible(true);
    }

    Hi Andrew,
    In my case, it does not require any web server. I could not use javaws.
    There is way work around by using Runtime.exec(). The MS Windows CMD hides when I double click the start.bat file.
    File start.bat:------------------------------------------------------------------------------------
    java Test
    File Test.java:-----------------------------------
    public class Test
         public static void main(String[] args)
              try{
                   Runtime r = Runtime.getRuntime();
                   r.exec("java Reminder");
              }catch(Exception e)
                   e.printStackTrace();
    File Reminder.java has been attached in the original post.
    Regards,
    Byron

  • Can you see which apps are open and/or running like you can on an android phone by going to settings applications running services?

    can you see which apps are open and/or running (like you can on an android phone by going to settings>applications>running services)?

    Hi wjosten,
    thank you for the help.  I should have said I had a iphone 3.  A friend has the same phone and she showed me how she can see what web pages are open when she double taps the home button.  Mine is set to bring up favourites when I double tap (chosen from settings>general>home button).. BUT my choices are only HOME; SEARCH; PHONE FAVORITES; CAMERA or IPOD.  I changed my choice to HOME but that just defeats the purpose as when I am at the home page and double tap nothing happens.  Am I making sense?

  • What are the requirements to run a Swing application?

    I'm trying to send a simple swing application to a friend that has Mac OSX, but the buttons don't show up.
    Do people actually need the Java SDK in order for swing apps to work? Or is plain java enough? (He has normal java, because we play minecraft sometimes)
    Anyway, my buttons are not showing up on his computer, not even when I use the cross platform look at feel

    Here is the code I'm using, it's an application that makes the user select a folder and stuff will happen to it.
    import java.awt.Font;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class SomeGUI extends JFrame implements ActionListener, Runnable
        public JButton exit;
        public JButton run;
        JPanel panel;
        JFileChooser chooser;
        String returnpath;
        JLabel progress;
      public SomeGUI()
         try
         UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
         catch (ClassNotFoundException ex)
             Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
         catch (InstantiationException ex)
             Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
         catch (IllegalAccessException ex)
             Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
         catch (UnsupportedLookAndFeelException ex)
             Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
          setTitle("BenkyoAdd");
          setSize(206,100);
          setResizable(false);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setLocationRelativeTo(null);
          setVisible(true);
          panel = new JPanel();
          getContentPane().add(panel);
          panel.setLayout(null);
          run = new JButton("Run");
          run.setFocusable(false);
          run.setBounds(0,0,100,30);
          panel.add(run);
          run.addActionListener(this);
          progress = new JLabel("Please click run");
          progress.setFont(new Font("lol",Font.PLAIN,14));
          progress.setBounds(10, 30, 200, 50);
          panel.add(progress);
          exit = new JButton("Exit");
          exit.setFocusable(true);
          exit.setBounds(100, 0, 100, 30);
          panel.add(exit);
          exit.addActionListener(this);
          chooser = new JFileChooser();
          chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        public void actionPerformed(ActionEvent e)
         if(e.getSource().equals(exit))
             System.exit(0);
         if(e.getSource().equals(run))
             progress.setText("Select a folder...");
             chooser.showOpenDialog(panel);
             this.returnpath = chooser.getSelectedFile().getAbsolutePath();
             exit.setEnabled(false);
             run.setEnabled(false);
             progress.setText("Copying to output folder...");
             new Thread(this).start();
      public static void main(String args[])
          new SomeGUI();
        public void run()
         new Changer(this, this.returnpath);
         exit.setEnabled(true);
         exit.requestFocusInWindow();
         progress.setText("Done! You can now exit!");
    }

  • I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?,

    I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?, I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?, I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?

    Thanks, Flex harUI, for the direction in regards to isolating build changes. That aside (still working on it), can you offer any direction in regards to my original question on SDK and AIR compatibility? I'm specifically looking for a version compatibility mapping or anything that definitively states, "Flex SDK x.y.z works with the following versions of AIR". This information is crucial for us in order to more specifically plan our own roadmap built upon these two frameworks as we consider both existing installations of our software and future distributions.

  • Any known issue about running Swing application in WTS?

    *{color:#0000ff}Is there any known issue about running Swing Application in Windows Terminal Server?{color}*
    It is started using JWS from internet (I mean, it checks if there is an avaiable update and updates or just fun).
    _*{color:#800000}+The problem is that just one machine can open the application at the same time+*_
    _*{color}*_
    *{color:#666699}Is there any config in java or jws to run properly several instances of the application (terminal clients)?{color}*
    Edited by: Franzisk on Sep 24, 2007 6:16 PM

    876587 wrote:
    ... and that cause the other threads cannot access the JNI. The same application works fine on other Solaris 10 machines.
    Different environments mean just that. So something could be causing it outside java.
    Additionally if anything at all is different in the execution data, such as even a name having a different size, then it would change the execution path.
    Which would cause a problem in the JNI code to manifest itself on only one box. Probably isn't a pointer bug but all sorts of odd behavior can result from that.

  • How do I show applications running in the background? And how do I close them down? In class, the instructor press something but she did not go into Settings. Does anyone know?

    How do I show applications running in the background? And how do I close them down? In class, the instructor press something but she did not go into Settings. Does anyone know?

    Double-click the home button that will bring up all the applications in the background.
    To close then you swipe the application upward and it will close.

  • Can the apple ID that's the way to eliminate the use of the vacuum when the applications running on the iPad so it does not ask the apple ID code.

    Can the apple ID that's the way to eliminate the use of the vacuum when the applications running on the iPad so it does not ask the apple ID code.

    I don't understand what you are asking - what are you trying to do ?

  • Run Swing application without opening DOS prompt window

    is it possible to run a Swing application without opening a command interface window in MS Windows?
    thanks

    Don't know if you mean that, but if you try to call javaw.exe instead of java.exe there pops no prompt up.

  • Why does the application built executable run slower than my developement lib.

    The Response given was LabView 5.0.1.f1 specific. Iam however, using LabView 6.i. The Application runs approximatley 3 to 40 times slower than the developement library. Additionally the Write to spreadsheet data is corrupted when using the application executable. Is there a different solution for 6.i ????
    Tnx
    Len Kraus

    That does not sound right. I recommend rebuilding your VI. Beore you do, open the top level VI and press contol-shift-run arrow to perform a manual binary recompile. This makes LabVIEW recompile the whole code. Most times you will not see anything happen but occasionally an error will surface. Be sure to save the VI then rebuild it.
    You may also need to reinstall the LabVIEW run time engine and/or LabVIEW. I would start with the run time engine first.

  • Changes made to .css file in adf application, Does need to run the page again

    Hi Gurus,
    Please explain me, Changes made to .css file in running adf application, Does need to run the page or just refreshing page from browser will pickup the changes for oracle ADF 11g R2.
    Warm Regards,
    Md Jahangir Pasha

    Hi,
    you have to set CHECK_FILE_MODIFICATION parameter value to "true" on web.xml file.
    <context-param>
        <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
        <param-value>true</param-value>
      </context-param>

  • Does Open ESB run as standalone application?

    Hi all,
    does Open ESB run as standalone application (i.e. like ServiceMix) or it works only inside an AS?
    Thanks,
    Michele

    Hi,
    I have not tried it out yet, but there is en experimental version on openesb site to download:
    "jbi-javase.jar is an experimental version at this point which makes it possible to run without an appserver. Just unjar the version and run the container with the following command: "java -jar lib/jbi_framework.jar". This uses 8699 for jmx port. If you need to use a different port, use -Dconnector.port=xxxx where xxxx stands for the new port."

  • How run a JEE swing application client ?

    I'm making Jee tests, using NetBeans 6.8 and GlassFish v3.
    I have an application that has an EJB module and two interface clients (jar app-client and war web-client).
    Each client uses same ejb module.
    For test the web module, I made this:
    1) I set the client module for the project:
    - Right click on the project (JeeTest) -> Properties -> Run
    - Select JeeTest-war as client module
    2) When Run the project from NetBeans, it works fine
    3) Test the project directly in the web browser and also works fine.
    For test the swing application, I made this:
    1) I set the client module:
    - Right click on the project (JeeTest) -> Properties -> Run
    - Select JeeTest-app-client as client module
    2) Run the project from NetBeans, it works fine
    3) But, When I try test the jar file, outside NetBeans, not working
    The question:
    How test the swing application outside netbeans?
    [Here I put the project code for NetBeans|http://www.blueboxmicrosystems.com/JeeTest.zip]

    Hi ! gimbal2
    I Launched from the command prompt: java -jar jeetest-app-client.jar
    Opened the form, but when I press the button to call the ejb, returns this error:
    01/02/2010 11:05:00 PM forms.MainForm btnSayMessageActionPerformed
    GRAVE: null
    javax.naming.NoInitialContextException: Need to specify class name in environment or
    system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at forms.MainForm.btnSayMessageActionPerformed(MainForm.java:90)
    at forms.MainForm.access$000(MainForm.java:25)
    at forms.MainForm$1.actionPerformed(MainForm.java:53)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    The JeeTest-ejb module, have 2 classes:
    Message.java
    package ejb;
    import javax.ejb.Stateless;
    @Stateless
    public class Message implements MessageRemote {
        public String sayHello() {
            return "Hello, from EJB !!!";
    MessageRemote.java
    package ejb;
    import javax.ejb.Remote;
    @Remote
    public interface MessageRemote {
        String sayHello();
    }In the JeeTest-app-client, I am trying call the ejb from a Jbutton in the form, and pass the value to a JTextField, like this:
            String message="";
            try {
                Context context = new InitialContext();
                MessageRemote messageRemote = (MessageRemote) context.lookup(MessageRemote.class.getName());
                message=messageRemote.sayHello();
            } catch (NamingException ex) {
                Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
            this.txtMessage.setText(message);I put the code for the project HERE
    Edited by: m_ilio on 01/03/2010 03:24 AM
    Edited by: m_ilio on 01/03/2010 03:25 AM

  • UI problem when run java swing application on MAC OSX

    Hello,
    I have problem when i run my java swing application on MAC OSX.
    Dialog box is not properly visible in MAC means ita size increses.
    its size incresed and and some content or buttons on that dialog are not fully visible.
    I can only see partial message or button.
    If any one have idea about this problem then give the solution.
    Thanks :)
    Shweta

    I am using following way to create dialog
    JOptionPane optionpane = new JOptionPane(new Object[]{lblMsgUp}, JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, choices, "Save");
    JDialog dialog = optionpane.createDialog(parent, "Save");
    dialog.setSize(450, 125);
    dialog.setVisible(true);

  • How do you run a (Word) Document from a Swing application

    I want to create a Word Document and then open it from a Swing application. If you can't do that directly, what else can you do to get that result.

    gwils wrote:
    How do you recover a word document on a macbook pro?
    Just as you do it on a Mac Pro or a Mac Mini.
    What version of Mac OS X? What version of MS Word?
    If you're thinking of the AutoRecover feature, you have to enable it first. If it was enabled, this
    <http://kb.iu.edu/data/ahnd.html#FindingfilesMac>
    will tell you what to do.

Maybe you are looking for