Swing in Linux

pls help me to solve the following queries.
will the swings work same as that of windows
if not what i'm supposed to do pls tell me.
then will j2se1.4 and j2ee1.3.1 works along with Linux
thank you
saju.m

Assuming everything is configured the right way (a really big assumption, I know), swing should work the same on any platform. My basic swing apps have compiled and run on Windows XP, MacOS 10.1, and Red Hat Linux with no changes. I've had lots of problems trying to get anything to run on Debian, though. This is all using j2sdk1.4.1. I don't know about j2ee1.3.1
-dudley

Similar Messages

  • Looking for icon collection for Swing

    Hi.
    I need some icons for Swing which are not present in
    http://developer.java.sun.com/developer/techDocs/hi/repository .
    Where could I download a collection of icons? On www.netbeans.org, I was unable to locate the file
    to download.
    N.B.: I'm not a netBeans user. I'm just insterested in the icon collection.
    Thanks in advance.

    sorry, it should be this one:
    http://www.iconfactory.com/ware.asp
    Hi kkwong00 !
    I need '.gif' or '.jpg' icons for Swing on Linux. On the site you told me, there are a lot of icons, but they
    are for Windows or Mac OS. I don't know how to use theses icon files under Swing/Linux. Follwoing is
    how I use the icon files :
    java.net.URL imageURL =
    <myclass>.class.getResource(imgLocation); //String imgLocation contains dirname/file.gif
    ImageIcon = ImageIcon(imageURL);
    Christophe.

  • LINUX Java Programming

    Hi this is Kashishs , i wanna know how to use swings in Linux as i have tried to run my java programmes on Linux and i am getting error that JFrame not found.
    What could be the reason please advise.
    [email protected]

    PLZ elaborate,
    how and where.
    I am new to linux platform

  • Form becomes inactive

    I am trying to create a simple window using a JFrame, and some buttons. My code is correct, I'm sure of this, everything is displaying correctly, however after my app loads, the background of the frame turns dark purple, and none of my buttons are clickable (I have an action listener written for them, as well as tool tips to see if I can even roll over and they don't work either) is there something I'm missing? I've been using java for school for a few years now and I've never ran in to this problem before. This is the first time I've tried programming swing in linux however, could this be the problem?
    Thanks!

    SwingUtilities.invokeLater(new Runnable()
    public void run()
    try
    cheers c=new cheers();
    c.frame.validate();
    }//try
    catch(Exception E)
    }//run
    });--try to use this
    you are somewhere adding components to frame after the frame is visible
    or trying to make some components setVisible(false) after frame is
    Visible.
    make frame visible after all component is added.
    I had similar problem because I was setting frame.setVisible(false);
    after main frame was visible.

  • Window becomming inactive

    I am trying to create a simple window using a JFrame, and some buttons. My code is correct, I'm sure of this, everything is displaying correctly, however after my app loads, the background of the frame turns dark purple, and none of my buttons are clickable (I have an action listener written for them, as well as tool tips to see if I can even roll over and they don't work either) is there something I'm missing? I've been using java for school for a few years now and I've never ran in to this problem before. This is the first time I've tried programming swing in linux however, could this be the problem?
    Thanks!

    Post your code here to see if we can spot any problem.

  • Keyboard-lock of swing program on Linux box

    We are developing swing program on Linux, and we often meet keyboard-lock issues.
    I try to simplify some of them to small programs, and still meet keyboard-lock.
    Here I post two programs to show the error:
    //---first ----------------------------------------------
    package test;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class KeyLock extends JFrame {
      JPanel contentPanel = new JPanel();
      JPanel wizardToolPan = new JPanel();
      JButton btnBack = new JButton("Back");
      JButton btnNext = new JButton("Next");
      JButton btnAbout = new JButton("About");
      public static final String aboutMsg =
              "<html>  This program will help to find keyboard lock problems, two way to reproduce:<br><br>" +
              "1 - press Alt+N to navigate next, and don't release keys untill there are no more next page, <br>" +
              "then try Alt+B to navigate back and also don't release keys untill page 0,<br>" +
              "repeat Alt+N and Alt+B again and again, keyboard will be locked during navigating. <br><br>" +
              "2 - press Alt+A in main window, it will popup an about dialog,<br>" +
              "then press down space key and don't release, <br>" +
              "the about dialog will be closed and opened again and again,<br>" +
              "keyboard will be locked sooner or later." +
              "</html>";
      public KeyLock() {
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setTitle("Keyboard lock test");
        getContentPane().setLayout(new BorderLayout());
        btnBack.setMnemonic('B');
        btnBack.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            KeyLock.this.goBack(e);
        btnNext.setMnemonic('N');
        btnNext.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            KeyLock.this.goNext(e);
        btnAbout.setMnemonic('A');
        btnAbout.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(KeyLock.this, aboutMsg, "About", JOptionPane.INFORMATION_MESSAGE);
        contentPanel.setLayout(new BorderLayout());
        contentPanel.setPreferredSize(new Dimension(400, 250));
        contentPanel.setMinimumSize(new Dimension(400, 250));
        wizardToolPan.setLayout(new FlowLayout());
        wizardToolPan.add(btnBack);
        wizardToolPan.add(btnNext);
        wizardToolPan.add(btnAbout);
        this.getContentPane().add(contentPanel, java.awt.BorderLayout.CENTER);
        this.getContentPane().add(wizardToolPan, java.awt.BorderLayout.SOUTH);
        this.setSize(400, 300);
        this.createContentPanels();
        this.showCurrent();
      private Vector<JPanel> slides = new Vector<JPanel>();
      private int current = 0;
      private void createContentPanels() {
        for (int j = 0; j < 20; ++j) {
          JPanel p = new JPanel(new FlowLayout());
          p.add(new JLabel("Page: " + j));
          p.add(new JTextField("Page: " + j + ", input something here", 20));
          p.add(new JTextField("Page: " + j + ", input something here", 20));
          p.add(new JTextField("Page: " + j + ", input something here", 20));
          p.add(new JLabel("Input something in password box:"));
          p.add(new JPasswordField(20));
          p.add(new JCheckBox("Try click here, focus will be here."));
          p.add(new JRadioButton("Try click here, focus will be here."));
          slides.add(p);
      public void showCurrent() {
        if (current < 0 || current >= slides.size())
          return;
        JPanel p = slides.get(current);
        this.contentPanel.add(p, java.awt.BorderLayout.CENTER);
        this.pack();
        Component[] comps = p.getComponents();
        if (comps.length > 0) {
          comps[0].requestFocus(); // try delete this line
        this.repaint();
      public void goNext(ActionEvent e) {
        if (current + 1 >= slides.size())
          return;
        this.contentPanel.remove(slides.get(current));
        current++;
        sleep(100);
        this.showCurrent();
      public void goBack(ActionEvent e) {
        if (current <= 0)
          return;
        this.contentPanel.remove(slides.get(current));
        current--;
        sleep(100);
        this.showCurrent();
      public static void sleep(int millis) {
        try {
          Thread.sleep(millis);
        } catch (Exception e) {
          e.printStackTrace();
      public static void main(String[] args) {
        KeyLock wizard = new KeyLock();
        wizard.setVisible(true);
    }The first program will lead to keyboard-lock in RHEL 4 and red flag 5, both J2SE 5 and 6.
    //---second -----------------------------------------
    package test;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class KeyFocusLost extends JFrame {
      private JButton btnPopup = new JButton();
      private JTextField jTextField1 = new JTextField();
      private JPasswordField jPasswordField1 = new JPasswordField();
      private JPanel jPanel1 = new JPanel();
      private JScrollPane jScrollPane3 = new JScrollPane();
      private JTree jTree1 = new JTree();
      private JButton btnAbout = new JButton("About");
      public static final String aboutMsg =
              "<html>  This program is used to find keyboard focus lost problem.<br>" +
              "Click 'popup' button in main window, or select any node in the tree and press F6,<br>" +
              "a dialog popup, and click ok button in the dialog,<br>" +
              "keyboard focus will lost in main window." +
              "</html>";
      public KeyFocusLost() {
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setTitle("Keyboard focus test");
        getContentPane().setLayout(null);
        btnPopup.setBounds(new Rectangle(33, 482, 200, 35));
        btnPopup.setMnemonic('P');
        btnPopup.setText("Popup and lost focus");
        btnPopup.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            PopupDialog dlg = new PopupDialog(KeyFocusLost.this);
            dlg.setVisible(true);
        btnAbout.setBounds(new Rectangle(250, 482, 100, 35));
        btnAbout.setMnemonic('A');
        btnAbout.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(KeyFocusLost.this, aboutMsg, "About", JOptionPane.INFORMATION_MESSAGE);
        jTextField1.setText("Try input here, and try input in password box below");
        jTextField1.setBounds(new Rectangle(14, 44, 319, 29));
        jPasswordField1.setBounds(new Rectangle(14, 96, 319, 29));
        jPanel1.setBounds(new Rectangle(14, 158, 287, 291));
        jPanel1.setLayout(new BorderLayout());
        jPanel1.add(new JLabel("Select any node in the tree and press F6."), java.awt.BorderLayout.NORTH);
        jPanel1.add(jScrollPane3, java.awt.BorderLayout.CENTER);
        jScrollPane3.getViewport().add(jTree1);
        Object actionKey = "popup";
        jTree1.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), actionKey);
        jTree1.getActionMap().put(actionKey, new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            PopupDialog dlg = new PopupDialog(KeyFocusLost.this);
            dlg.setVisible(true);
        this.getContentPane().add(jTextField1);
        this.getContentPane().add(jPasswordField1);
        this.getContentPane().add(jPanel1);
        this.getContentPane().add(btnPopup);
        this.getContentPane().add(btnAbout);
      public static void main(String[] args) {
        KeyFocusLost keytest = new KeyFocusLost();
        keytest.setSize(400, 600);
        keytest.setVisible(true);
      static class PopupDialog extends JDialog {
        private JButton btnOk = new JButton();
        public PopupDialog(Frame owner) {
          super(owner, "popup dialog", true);
          setDefaultCloseOperation(DISPOSE_ON_CLOSE);
          this.getContentPane().setLayout(null);
          btnOk.setBounds(new Rectangle(100, 100, 200, 25));
          btnOk.setMnemonic('O');
          btnOk.setText("OK, then focus lost");
          btnOk.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              PopupDialog.this.getOwner().toFront();
              try {
                Thread.sleep(100); // try delete this line !!!
              } catch (Exception ex) {
                ex.printStackTrace();
              PopupDialog.this.dispose();
          this.getContentPane().add(btnOk);
          this.getRootPane().setDefaultButton(btnOk);
          this.setSize(400, 300);
    }The second program will lead to keyboard-focus-lost in RHEL 3/4 and red flag 4/5, J2SE 5, not in J2SE 6.
    And I also tried java demo program "SwingSet2" in red flag 5, met keyboard-lock too.
    I guess it should be some kind of incompatibleness of J2SE with some Linux platform. Isn't it?
    Please help, thanks.

    Hi.
    I have same problems on Ubuntu with Java 6 (all versions). I would like to use NetBeans or IntelliJ IDEA but it is not possible due to keyboard locks.
    I posted this bug
    https://bugs.launchpad.net/ubuntu/+bug/174281
    before I found some info about it:
    http://forums.java.net/jive/thread.jspa?messageID=189281
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6568693
    I don't know from which part this bug comes, but I wonder why it isn't fixed yet. Does anybody else use NetBeans or IntelliJ IDEA on linux with Java 6 ?
    (I cannot insert link :\ )

  • Keyboard Problem while running Swing App on LINUX

    Hi All,
    We have a Swing based Application running on Windows Platform. We need to run the Application on LINUX. The Application does not have any problem and runs without problems for a few minutes but after that the keyboard stops to respond inside the application. Keyboard runs fine outside the application but no key events are recognized inside the application. Mouse is working fine even after the keyboard stops responding.
    Key Points:
    �     The keyboard is a PS/2 keyboard.
    �     Read Hat Fedora 5.0 is being used.
    �     The problems occur on both KDE and GNONE.
    �     The Java Version is jdk1.5.0_09
    The application is data entry application using EJB at server side. The client UI has lot of JTables and Desktop Panes/ Internal Frames. User use ctrl+tab, ctrl+shift+tab, tab, shift+tab, and other hot keys to navigate between Components. Listeners on keyboard Focus Owner are also used. We are unable to diagnose the problem because of the undeterminable nature of the problem. The problem occurs at anytime and does not occur on any special key/ combinations press.
    Thanks and Regards,
    Nishant Saini
    http://www.simplyjava.com

    I've just installed the JDK 1.4 on my debian box. I
    can compile and run a basic Hello World app using
    System.println, but when I try to run a simple swing
    app, I get an error like:
    Exception in thread "main"
    java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.... etc, etc.
    It goes on with about 30 different classes. It
    compiles fine, with no errors, but when it comes time
    to run, that's what I get. This is what I have in my
    .bash_profile as far as environment variables go:
    export JAVA_HOME="/usr/local/j2sdk1.4.1_01"
    export PATH="$JAVA_HOME/BIN:$PATH"
    export
    CLASSPATH="$JAVA_HOME/jre/lib/:$JAVA_HOME/lib:."The code works fine in Windows, so unless there's
    something platform-specific, I don't think there's a
    problem there. I've checked to make sure I'm not
    running kaffe by accident and I'm definitely running
    the right java and javac. I'm out of ideas. Any
    suggestions would be greatly appreciated.
    -dudley
    I may just be crazy, but your PATH looks a little screwy to me. I was under the impression that the standard java installation has its executables in the 'bin' directory, not the 'BIN' directory. Unless Debian has fallen to the evil empire, then I'm fairly sure file names are case-sensitive. I don't know if that will fix your problem though. Do you compile from the command line, or do you use an IDE???

  • Fault encountered in running a Java Swing Appl on a Linux Platform

    hello friends,
    problem:
    Whenever i aim to run any of the Java AWT/ Swing Applications (that produce a graphical o/p), on a RED HAT LINUX 9.0 platform i get the error as attached (error.txt)..the programs get compiled but doesnt get executed and do not produce any graphical o/p. Can anyone plz suggest a solution for this..?
    Other non-graphical applications and applets run smoothely.
    Expecting a help in this regard from any kind soul.....
    take care.
    this is what the error.txt file shows.......
    [sum@localhost graphics]$ java JFrameExample > error
    returned
    end
    Exception in thread "main" java.lang.VerifyError: verification failed at
    PC 123 in
    javax.swing.JComponent:getListeners((Ljava.lang.Class;)[Ljava.util.EventListener;):
    incompatible
    return type     at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String)
    (/usr/lib/./libgcj.so.3)   at 0x4025bc8e:
    java.lang.Error.Error(java.lang.String) (/usr/lib/./libgcj.so.3)
       at 0x4025d6b6: java.lang.LinkageError.LinkageError(java.lang.String)
    (/usr/lib/./libgcj.so.3)
       at 0x402691b6: java.lang.VerifyError.VerifyError(java.lang.String)
    (/usr/lib/./libgcj.so.3)
       at 0x4023f5a9: _Jv_BytecodeVerifier.verify_fail(byte, int)
    (/usr/lib/./libgcj.so.3)
       at 0x40232c51: _Jv_BytecodeVerifier.verify_instructions_0()
    (/usr/lib/./libgcj.so.3)
       at 0x40231857: _Jv_VerifyMethod(_Jv_InterpMethod)
    (/usr/lib/./libgcj.so.3)
       at 0x40229ae4: _Jv_PrepareClass(java.lang.Class)
    (/usr/lib/./libgcj.so.3)
       at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class)
    (/usr/lib/./libgcj.so.3)
       at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class)
    (/usr/lib/./libgcj.so.3)
       at 0x4024646c: java.lang.Class.initializeClass()
    (/usr/lib/./libgcj.so.3)
       at 0x402296af: _Jv_ResolvePoolEntry(java.lang.Class, int)
    (/usr/lib/./libgcj.so.3)
       at 0x40230827: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
       at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
       at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
       at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
       at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
       at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
       at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x40242dd8: gnu.gcj.runtime.FirstThread.call_main()
    (/usr/lib/./libgcj.so.3)
       at 0x402ad02d: gnu.gcj.runtime.FirstThread.run()
    (/usr/lib/./libgcj.so.3)
       at 0x4024fc4c: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
       at 0x4021c8ac: _Jv_RunMain(java.lang.Class, byte const, int, byte
    const, boolean) (/usr/lib/./libgcj.so.3)
       at 0x08048910: ?? (??:0)
       at 0x42015574: __libc_start_main (/lib/tls/libc.so.6)
       at 0x080486c1: ?? (??:0)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I suspect your distribution came with some open source and half-assed implementation of Java that just doesn't work. Remove that Java from your path (or uninstall it entirely). Then, download and install Sun's Java (JRE) from http://java.sun.com/j2se/1.5.0/download.jsp.

  • Keyboard layouts, linux and Swing

    Hi,
    I have some applications written with Swing. They run fine on Windows but on my linux box I can't type national (non-us) characters in it. I also did run JEdit which also behaves wrong - it can display non-us characters when I load file from disk but regardless of what keyboard layout I choose in KDE it can't recognize it correctly. Linux programs works fine.
    I did some investigations and found, that KeyListener always returns 0x00 for those keystrokes which should produce national characters.
    I need to be able to switch keyboard layouts at runtime without changing OS locale - this is multilangual application.
    So, my question is: what do I have to do with my linux box setup to have correctly working keyboard layouts with swing applications? Mabe someone can explain me how java reads keyboard in X-es?
    regards,
    Tomasz Sztejka

    Ok, I have found that when I set system locale to pl_PL (by export LC_ALL="pl_PL" from shell) then Polish keyboard works.
    The problem is, I can't do that - the system locale must be left unspecified (POSIX or C) and Java application must be able to accept input from many languages all around the world.
    For example, if I switch keyboard to bulgarian, swing sees some japanese (or similar) characters. On the other hand, when I will set locale to ru_RU then russian layout works correctly, while polish does produce garbage.
    Please, help!

  • Different Swing behaviour in Windows & Linux

    Hi ,
    I have an IDEFIX Application(J2ee) whose Client is built on Java Swing.
    Addtionally this application had to invoke an 3rd party Software.
    On invoking the 3rd party Software from this application & on load
    of the 3rd party Software.The Swing Behavior of the client
    of IDEFIX Application behaves in a different way . for Eg : the
    Disabled buttons are not visible ,enterlly the view becomes somewhat
    differrnt & distorted.
    IDEFIX Application invokes the 3rd party s\w through a Thread.
    But The main problem is that it works properly in Linux ,
    The problem arises in Windows system.
    If any body has the solution Please tell
    Regards,
    Sajeev

    The glitchs happen when I run the code in windows. First off when I press the quit button in linux the actionlistener picks up that I hit the quit button and makes a new instance of QuitPopup which simply sets itself to visible. I'm using the default layout manager and on linux the popup window simply comes up in a seperate JFrame and I can click the buttons on it etc..
    In Windows, using the same code when I press the quit button I see the QuitPopup instance come up but it is like it is drawn ontop of the first JFrame. There is no border and the buttons inside of the QuitPopUp() JFrame don't work. When you move your mouse over them the buttons in the original JFrame appear to "come through" and erase the pop-up's graphics.
    For borders on the first JFrame I'm using a no-border full-screen JFrame. For the popup I'm using the default border.
    I'm using the default font on both.
    Also For the fullscreen JFrame in the background I'm using layeredPanes ontop of the JFrame. I have placed buttons inside of the layeredPanes and when I click on them the image I have set for the rollovericon action keeps flashing after I click on it. NOTE: the flashing buttons ONLY happens in windows.
    Do you think trying a different layout manager rather than the default would work better?

  • 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..
    Prabhu.S

    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..
    Prabhu.S

  • Swing Java 8 Linux Radeon Crash

    I'm developing a Swing app on a Linux workstation.  When resizing the window of the running app, I get a crash caused by something (I assume the JVM) trying to initialize/load the linux kernel radeon module.  I'm not using that module.  In fact, I have the radeon module blacklisted because I'm using the native fglrx catalyst driver, which requires nomodeset, and the radeon module doesn't work with nomodeset.  Running the app under Java 7, this does not occur.
    Nothing special about the app: a JFrame with a toolbar and a JTable.
    Any insight/tips/suggestions?
    Details:
    Java 8 (crashes):
    Java(TM) SE Runtime Environment (build 1.8.0-b132)
    Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
    Java 7 (works):
    Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
    Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
    System:
    Linux 3.9.10-100.fc17.x86_64 #1 SMP x86_64 GNU/Linux
    X.Org X Server 1.12.4
    xorg-x11-drv-catalyst 12.10

    I'm developing a Swing app on a Linux workstation.  When resizing the window of the running app, I get a crash caused by something (I assume the JVM) trying to initialize/load the linux kernel radeon module.  I'm not using that module.  In fact, I have the radeon module blacklisted because I'm using the native fglrx catalyst driver, which requires nomodeset, and the radeon module doesn't work with nomodeset.  Running the app under Java 7, this does not occur.
    Nothing special about the app: a JFrame with a toolbar and a JTable.
    Any insight/tips/suggestions?
    Details:
    Java 8 (crashes):
    Java(TM) SE Runtime Environment (build 1.8.0-b132)
    Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
    Java 7 (works):
    Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
    Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
    System:
    Linux 3.9.10-100.fc17.x86_64 #1 SMP x86_64 GNU/Linux
    X.Org X Server 1.12.4
    xorg-x11-drv-catalyst 12.10

  • Java.swing & linux

    I've tried to compile this program using javac compiler
    import javax.swing.*;
    public class HelloWorldSwing {
    public static void main(String[] args) {
    JFrame frame = new JFrame("HelloWorldSwing");
    final JLabel label = new JLabel("Hello World");
    frame.getContentPane().add(label);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
    but I get an error telling me that JFrame object is not found. I run Mandrake 10.1 and have all the RPMs containing name java installed. Probably some system variables aren't properly set, but I don't know what that variables are. $JAVA_HOME is set to /usr/lib/jre-1.4.2_05.

    Installation notes for linux on the Sun site can be viewed here..
    http://java.sun.com/products/archive/j2se/1.4.2_07/install-linux.html
    Try entering "java -version" in the shell and see what the out put is. Also I believe that once the Sun version of Java has been installed correctly the JAVA_HOME variable should be close to "/usr/java/jdk<version>/bin"

  • TAB key isn't available in swing applications on Linux

    Hello,
    I have a small Swing application, everything works fine except that TAB key isn't available within java
    application. I tried several JVM (IBM and Sun JVM from 1.2.2 to 1.4.0_b92) and two Red Hat release (6.2 and 7.2), I had no success with TAB key. The same application works perfectly on Windows for example. Can this problem have something to do with a bad Xmodmap file? I tried with a standard Xmodmap file (/usr/X11R6/lib/X11/etc/xmodmap.std), but TAB key was still unavailable. On non-java application, TAB key is available normally.
    Any suggestion would be appreciated.
    Thanks in advance.

    Do you mean that
    (1) when you are running a swing application and you press the tab key expecting focus traversal, nothing happens?
    OR
    (2) when you are listening for KeyEvent within your application, tab key doesn't give you KeyEvent.VK_TAB?
    OR
    (3) something else?
    I have no Linux but would try to offer suggestions if I understood better.

  • Unable to set classpath javax/swing/japplet in Linux

    Hi,
    I have a problem in running an Applet program in Linux. If I run I get the following message.
    "Javax/swing/JApplet error Java.lang.NoClassDefFound Error".
    I have set my .bash_profile as follows:
    CLASSPATH=/usr/java/jdk1.3_0_01/jre/lib
    CLASSPATH=/usr/java/jdk1.3_0_01/lib
    CLASSPATH=/usr/java/jdk1.3_0_01/
    EXPORT
    Please tell me whether I have created the .bash_profile correctly. or anything to be changed. It will be great help if anybody hep in this regard. I am held up in my project.
    Thnaks.
    Mari
    11/09/02

    You don't need to set the CLASSPATH to get javax.swing.JApplet - the JVM "automagically" knows where the rt.jar file is. The only items you need in your CLASSPATH environment are third-party .jar files.
    I'm taking a wild guess based on your subject line, but I'll bet you mis-typed the ClassName - "JApplet," not "japplet." Your code should have
    import javax.swing.JApplet;in it.

Maybe you are looking for

  • PDF export problem

    Pages 09 - Lion - MBP I used Pages to create a book of 180 pages with some images. All the images (jpg) inside the text are with the cool apple tools like shadows and so on. Everithing is perfect and nice. I exported to pdf and again everything seems

  • How crate the G/L account

    Dear frinds Please guide how create the g/l account. thanks venkat

  • Best MacBook for Creating Video

    I need help choosing the best MacBook for creating sports videos using either iMovie or Final Cut.  I currently us a Mac Mini but I want to purchase a laptop to be more mobile.

  • HELP! Videos freezes then iPod resets.

    can somebody please help me? my iPod was working fine before but everytime I try to play a video, it randomly freezes at a random time and my iPod just resets by itself. i've tried everything from downgrading the firmware, restoring, using different

  • Directed call pickup

    does anyone know how to configure a key on an ip phone for a directed call pickup? i am looking for a one button operation that will do directed call pickup ext XXX.