Display Problem in Swing application

I have a java application.I am running it in Windows XP sp2.In this i see that some of the icons are missing and also not properly displayed.Can anybody tell me what is the reason behind this.

I think you can go ahead and ignore that RA by talking to Edmond Denis

Similar Messages

  • 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!
    Darin

    Walter,
    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 http://darindavis.net/languages/keyboard_Greek.pdf 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: http://www.screencast.com/t/TRKkKQrCgbN
    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.
    Thanks,
    Darin

  • Image resize problem in Swing Application

    Hi All
    I need a help on resizing and adjustment of Image in Swing application.
    I am developing a Swing Application. There I am displaying a image on header.
    I am finding it difficult to manage the image, as I want the image to perfectly fit horizontal bounds(Even on window resize).
    The current code given below is unable to do so.. Even it's not able to fit the horizontal bounds by default.
    ========================================
    //code for image starts
            BufferedImage myPicture;
            JLabel picLabel = null;
            try {
                 myPicture = ImageIO.read(new File("artes_header.png"));
                    picLabel = new JLabel(new ImageIcon(myPicture));
              } catch (Exception e) {
            GridBagLayout gLayout = new GridBagLayout();
            getContentPane().setLayout(gLayout);
            GridBagConstraints c = new GridBagConstraints();
            c.gridx = 1;
            c.gridy = 1;
            c.weightx = 1;
            c.fill = GridBagConstraints.BOTH;
            c.insets = new Insets(0, 0, 0, 0);
            panelTop.setBackground(Color.white);
            getContentPane().add(picLabel, c);
            c.gridx = 1;
            c.gridy = 2;
            c.weightx = 1;
            c.weighty = 1;
            getContentPane().add(tabPane, c);========================================
    Kindly anyone help me solve the same issue.
    Many thanks in advance.
    Regards,
    Gaurav
    Edited by: user7668872 on Jul 31, 2011 6:25 AM
    Edited by: user7668872 on Aug 4, 2011 3:56 AM

    Your questions doesnt make a whole lot of sence so not sure if this is what you want...
    This is a class to display an image on a jpanel. You can then use layout managers to make sure it is centrally alligned
    import java.awt.*;
    import javax.swing.*;
    import java.awt.image.BufferedImage;
    import javax.imageio.ImageIO;
    import java.io.*;
    class testImagePanel{
        public static void main(String[] args){
            BufferedImage image = null;
            ImagePanel imagePanel = null;
            try{
                image = ImageIO.read(new File("image.jpg"));
                imagePanel = new ImagePanel(image);
                imagePanel.setLayout(new BorderLayout());
            }catch(IOException  e){
                 System.err.println("Error trying to read in image "+e);
            JFrame frame = new JFrame("Example");
            frame.add(imagePanel);
            frame.pack();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);               
    public class ImagePanel extends JPanel {
        private BufferedImage image;
        private Dimension size;
        public ImagePanel(BufferedImage image) {
            this.image = image;
            this.size = new Dimension();
            size.setSize(image.getWidth(), image.getHeight());
            this.setBackground(Color.WHITE);
        @Override
        protected void paintComponent(Graphics g) {
            // Center image in this component.
            int x = (getWidth() - size.width)/2;
            int y = (getHeight() - size.height)/2;
            g.drawImage(image, x, y, this);
        @Override
        public Dimension getPreferredSize() { return size; }
    }

  • Thread problem in swing application?

    Hi,
    I have a doubt in GridLayout and Threads. I�m doing one small application which is accepting images and Alphabets. Actually, What I�m doing running images and alphabets(combinedly) in frequent intervals. For this I used GridLayout and Thread concept. But I have a problem in paint method. How to call the GridLayout frequently. In GridLayout , I�m putting Images and alphabets. Acutually in paint method , there are only drawString or drawImage or other methods. Is it possible to call my layout. Is so, can anybody help me in this regard. Is there any way to do it . please suggest me.
    Thanks,
    -Balaji
    My code follows:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    import java.awt.Color;
    import javax.swing.*;
    import java.applet.Applet;
    import java.util.*;
    import java.io.*;
    public class GridLayEx2 extends Applet implements Runnable {
    private Random r = new Random();
    private Thread imageThread = null;
    GridLayout glt;
    public void init() {
    glt = new GridLayout(3,3);
    setLayout(glt);
    } // end of init method
    public void start(){
    if (imageThread == null) {
    imageThread = new Thread(this, "GridLayEx2");
    imageThread.start();
    } // end of start method
    public void run(){
    Thread myThread = Thread.currentThread();
    while (imageThread == myThread) {
    repaint();
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e){ }
    }// end of run method
    public void paint(Graphics g){
    Font boldFont = new Font("Helvetica", Font.BOLD, 25);
    Font plainDerived =
    boldFont.deriveFont(Font.PLAIN, 25);
    JLabel myLabel[] = new JLabel[9];
    String myUrl = "C:\\Regoti\\Vision\\AP\\Project\\Version1\\images\\duke1.gif";
    myLabel[0] = new JLabel(new ImageIcon(myUrl));
    myLabel[1] = new JLabel("A");
    myLabel[2] = new JLabel("A");
    myLabel[3] = new JLabel("A");
    myLabel[4] = new JLabel("A");
    myLabel[5] = new JLabel("A");
    myLabel[6] = new JLabel("A");
    myLabel[7] = new JLabel("A");
    myLabel[8] = new JLabel("A");
    myLabel[1].setFont(boldFont);
    myLabel[2].setFont(boldFont);
    myLabel[3].setFont(boldFont);
    myLabel[4].setFont(boldFont);
    myLabel[5].setFont(boldFont);
    myLabel[6].setFont(boldFont);
    myLabel[7].setFont(boldFont);
    myLabel[8].setFont(boldFont);
    int values[] = new int[9];
    values = gen_pos_uni_ran_num(0,8);
    for(int i = 0; i < 9; i++)
    add(myLabel[values]);
    } // end of paint method
    public void stop(){
    imageThread = null;
    } // end of stop method
    public int[] gen_pos_uni_ran_num(int min, int max)
    int results[] = new int[Math.abs(max - min) + 1];
    for(int i = 0; i < results.length; ++i)
    results = -1;
    outer_loop:
    for(int i = 0; i < results.length; ++i)
    int random_int = (int)((Math.random() * results.length) + min);
    for(int j = 0; j < results.length; ++j)
    if(results[j] == random_int)
    random_int = (int)((Math.random() * results.length) + min);
    j = -1;
    continue;
    if(j == results.length - 1)
    results = random_int;
    continue outer_loop;
    return results;
    } // generate unique random numbers
    public static void main( String args[])
    Frame GridLayFrame = new Frame ( " Grid Layout Frame ");
    GridLayEx2 gl = new GridLayEx2();
    gl.init();
    GridLayFrame.add(gl);
    GridLayFrame.pack();
    GridLayFrame.setSize(GridLayFrame.getPreferredSize());
    GridLayFrame.show();
    GridLayFrame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    } // end of main method

    hi,
    i got one doubt in the previous application. i want to put labels in the circle manner while changing my label positions. Now it is rectangular type. And also i want to change my background color of JFrame. Please see my code ...
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    import java.awt.Color;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.util.GregorianCalendar;
    public class GridLayEx6 extends JApplet{ 
       private Random r = new Random(); 
       private ActionListener taskPerformer;
       private javax.swing.Timer timer;  
       private GridLayout glt;  
       private JLabel[] myLabel;     
       GregorianCalendar todayDate = new GregorianCalendar();     
       long fromTime,toTime,elapsedTime;
       public void init() {     
            glt = new GridLayout(3,3);     
          Font boldFont = new Font("Helvetica", Font.BOLD, 25);     
          Font plainDerived = boldFont.deriveFont(Font.PLAIN, 25);     
             myLabel = new JLabel[9];     
             String myUrl = "C:\\Regoti\\Vision\\AP\\Project\\Version1\\images\\MyArrow.jpg";
             String myUrlA = "C:\\Regoti\\Vision\\AP\\Project\\Version1\\images\\MyA.jpg";     
             URL url = null;     
       try{
       myLabel[0] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);     
       myLabel[1] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[2] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[3] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[4] = new JLabel("+", SwingConstants.CENTER);     
       myLabel[5] = new JLabel(new ImageIcon(myUrlA), SwingConstants.CENTER);
       myLabel[6] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[7] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[8] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[2].setVerticalAlignment(SwingConstants.NORTH);     
       myLabel[4].setFont(boldFont);     
       getContentPane().setLayout(glt);     
      } catch( Exception e)
        { System.out.println(" Exception occurs "+e);}
       int delay = 20000; //milliseconds     
       ActionListener taskPerformer = new ActionListener() {     
       public void actionPerformed(ActionEvent evt) {      
                 randomDuke();
       timer = new javax.swing.Timer(delay, taskPerformer);     
       addKeyListener(new KeyAdapter()      {        
          public void keyPressed(KeyEvent e){           
                 GridLayEx6 gl2 = (GridLayEx6)e.getSource();           
                     switch(e.getKeyCode())
                           case(KeyEvent.VK_ENTER): 
                                gl2.randomDuke();                 
                                break;
                       case(KeyEvent.VK_SPACE):              
                            if(gl2.timer.isRunning())                    
                              { gl2.timer.stop();                 
                                    toTime = System.currentTimeMillis();
                                 elapsedTime = toTime - fromTime;
                                 System.out.println("toTime : "+toTime);
                                 System.out.println("elapsedTime : "+elapsedTime);
                                  gl2.timer.start();
                                   gl2.randomDuke();
                               break;
                       case(KeyEvent.VK_KP_RIGHT):case(KeyEvent.VK_KP_UP):              
                       case(KeyEvent.VK_RIGHT):case(KeyEvent.VK_UP):              
                         int delay = gl2.timer.getDelay();
                         if(delay > 0)                    
                            gl2.timer.setDelay(delay - 100);                 
                            break;
                       case(KeyEvent.VK_KP_LEFT):case(KeyEvent.VK_KP_DOWN):              
                       case(KeyEvent.VK_LEFT):case(KeyEvent.VK_DOWN):
                            int delay = gl2.timer.getDelay();                  
                            if(delay < 10000)                    
                                 gl2.timer.setDelay(delay + 100);                  
                                 break;
                       //timer.start();  
             } // end of init method  
             public void start()   {     
                  timer.start();     
                    while(!isFocusOwner())        
                            requestFocus(); 
             } // end of start method     
             public void stop(){    
                  timer.stop();
            } // end of stop method     
             /** To make sure we have focus in application *  
             * mode if JFrame loses focus control          *  
             * - non standard usage of paintComponent      */    
             public void paintComponent(Graphics g)   {
                  while(!isFocusOwner())        
                       requestFocus();  
            public void randomDuke()   {     
                  fromTime = System.currentTimeMillis();
                  System.out.println("fromtime : "+fromTime);     
                  getContentPane().removeAll();     
                  int[] values = new int[9];     
                  int temp;
                  values = gen_pos_uni_ran_num(0,8);     
                  for ( int i=0; i<=8;i++)
                          if ( values[i] == 4)
                                 temp = 4;
                                 values[i] = values[4];
                                 values[4] = temp;
                  for(int q = 0; q < 9; q++)   
                        getContentPane().add(myLabel[values[q]]);    
                       myLabel[0].revalidate();
                       myLabel[1].revalidate();
                       myLabel[2].revalidate();
                       myLabel[3].revalidate();
                       myLabel[5].revalidate();
                       myLabel[6].revalidate();
                       myLabel[7].revalidate();
                       myLabel[8].revalidate();
                    } // end of randomDuke method  
              public int[] gen_pos_uni_ran_num(int min, int max)   {     
                  int results[] = new int[Math.abs(max - min) + 1];     
                  for(int q = 0; q < results.length; ++q) 
                       results[q] = -1;     
                  outer_loop:     
                  for(int q = 0; q < results.length; ++q)  
                       int random_int = (int)((Math.random() * results.length) + min);        
                    for(int j = 0; j < results.length; ++j)       
                        if(results[j] == random_int)            {              
                            random_int = (int)((Math.random() * results.length) + min);              
                            j = -1;
                      continue;           
                     if(j == results.length - 1)
                          results[q] = random_int;              
                          continue outer_loop;
                  return results;  
                  } // generate unique random numbers  
                  public static void main( String args[])
                        JFrame GridLayFrame = new JFrame ( " Grid Layout Frame ");     
                       GridLayFrame.setSize(500,500);     
                       GridLayEx6 gl = new GridLayEx6();     
                       gl.init();     
                       GridLayFrame.getContentPane().add(gl);     
                       //GridLayFrame.setBackgroundColor(Color.white);
                       GridLayFrame.setVisible(true);
                       gl.start();     
                       GridLayFrame.addWindowListener(new WindowAdapter()      
                         public void windowClosing(WindowEvent e)         
                        System.exit(0);         }      });  
                  } // end of main method
                  }

  • Java Swing application problem in Windows vista

    When we execute the Swing application in windows vista environment.
    The look and feel of the swing components are displayed improperly.
    Do we need to put any specific look and feel for windows vista environment or any specific hardware configuration is required to setup windows vista environment.
    Please give some inputs to solve the problem.
    We have tried with the following sample code to run in windows vista.
    * Vista.java
    * Created on December 5, 2006, 5:39 PM
    public class Vista extends javax.swing.JFrame {
    /** Creates new form Vista */
    public Vista() {
    initComponents();
    pack();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
    jButton1 = new javax.swing.JButton();
    jToggleButton1 = new javax.swing.JToggleButton();
    jPanel1 = new javax.swing.JPanel();
    jCheckBox1 = new javax.swing.JCheckBox();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jTextField1 = new javax.swing.JTextField();
    getContentPane().setLayout(null);
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("Button 1");
    getContentPane().add(jButton1);
    jButton1.setBounds(20, 20, 170, 30);
    jToggleButton1.setText("Togle btn");
    getContentPane().add(jToggleButton1);
    jToggleButton1.setBounds(100, 80, 90, 20);
    jPanel1.setLayout(null);
    jCheckBox1.setText("jCheckBox1");
    jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jPanel1.add(jCheckBox1);
    jCheckBox1.setBounds(10, 40, 130, 13);
    getContentPane().add(jPanel1);
    jPanel1.setBounds(10, 150, 200, 130);
    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);
    getContentPane().add(jScrollPane1);
    jScrollPane1.setBounds(210, 150, 164, 94);
    jTextField1.setText("jTextField1");
    getContentPane().add(jTextField1);
    jTextField1.setBounds(240, 30, 140, 30);
    pack();
    }// </editor-fold>//GEN-END:initComponents
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Vista().setVisible(true);
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToggleButton jToggleButton1;
    // End of variables declaration//GEN-END:variables
    }

    When we execute the Swing application in windows
    vista environment.
    The look and feel of the swing components are
    displayed improperly.Improperly means what? You must be aware that Vista's native L&F certainly isn't supported yet.

  • Problem with "find" mode in adf/swing application

    Hi all,
    I'm working on ADF Swing application which uses MS SQL Server 2005 (JDeveloper 10g 10.1.3)
    I think that my issue might be well-known…sorry if it has been already discussed somewhere else…
    I have a problem with the “find” mode for a detail panel in a master-detail form…(To make it clear the “find” mode is switched on when clicking on the special button on a navigation panel).
    So this mode works well in a master panel, but it demonstrates strange behavior on a detail panel, i.e. it takes me two attempts to find the necessary child object and it doesn’t switch back in a simple way from this mode to the normal mode….say if we are in the department 10 (Dept is a master form) we can’t simply find KING employee (Emp is a detail form)…is there any workaround for this?
    Thanks in advance. Alex.

    Hi Frank, please look this issue

  • Problem in Opening HTML Page in Internet Explorer from my Swing Application

    Hi,
    I am opening a HTML file in Internet Explorer from my swing application.I am using the code given below
    private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
    private final static String WIN_PATH = "rundll32";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    // url is HTML file Path
    Process p = Runtime.getRuntime().exec( cmd );
    Here there are two things i need to address ...
    1)The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.I want to open it in front of the Swing Application.I need to implement "Always On Top" functionality for the html page.
    2)Whenever i trigger action to open different HTML page,it opens in new Internet Explorer window.
    I need to open it in same IE window.
    how to solve out these problems ??? any help would be greatly appreciated .Thanks in advance.
    - Manikandan

    any idea about this ????

  • Displaying image on the swings application

    Hi All,
    I want to display images onto my swing application. I was using ImageIcon and Class to getResource(filename). It can only provide me images that i have placed in my package not outside my package.
    Please help me, how to to do?
    Thanks in advance.

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons

  • Problems After shifting swing application from jdk1.3 to 1.4

    hi,
    i have shifted my Swing application from jdk1.3 to 1.4, some component settings changed in j2se1.4. are listed below
    1). i have added JComboBox to JPanel using BoxLayout, in jdk1.3 it is normal where as in 1.4 comboBox height is increased to panel height.
    Sample code
    (in a Panel)
         setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    add(getYearComboBox());
         add(getMonthNameComboBox());
         add(getDayOfMonthComboBox());
    2). in jdk1.3 the icon which is set to JFrame is visible in the JOptioPane.showConfirmationDialog() also, but in 1.4 the icon is not visible in conformation dialog box.
    Sample Code
    in a JFrame's constructor
    public OptionPaneTest()
    ImageIcon icon = new ImageIcon("icon.gif");
    setIconImage(icon.getImage());     
    setSize(250,100);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
    setVisible(true);
    JOptionPane.showMessageDialog(this,"hai", "Hai",JOptionPane.WARNING_MESSAGE);
    3). the Labels added to the panel or frame are displaying in light blue color with jdk1.3 and the same label displaying in black with j2se1.3
    Sample Code
    in a JPanel
    setLayout(new BorderLayout(20, 20));
    add(new JLabel("Testing Label Color"), BorderLayout.CENTER);
    please send solution to any or all.
    thanks in advance,
    Pavan.DV

    Thanks for your sugession.
    You realized me by showing the fact that there are no many classes
    Keep suggesting like this.
    I don't even know how to see the API documentation Before you told me.
    Don't take any issue as simple thing and never give foolish suggessions like this.
    If you know the Answer then share it or else musukoni kurcho ra

  • 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);

  • Problem while creating JAR file for my swing application

    Hi...
    Using my swings application I am trying to Run different software�s .
    My program is Running fine from command prompt. If I create JAR file
    It is giving error like �Failed to load Main-Class manifest attribute from .jar�
    Can anybody help me to creating JAR file
    Thanks in advance
    Cheers
    Mallik

    hi,
    User following command
    jar-cmf textfile_name.txt Jarfile_name *
    here you have to make manifest file
    and making jar file you have reach there by command promt
    and manifest file have some constraint also as well as format
    format are
    Manifest-Version: 1.0
    Class-path: jar file name which are using in app separed by space
    Created-By: 1.5.0 (Sun Microsystems Inc.)
    Main-Class: Main class name
    and end of file is not have carriage return

  • Swing application with JavaHelp crashes outside Netbeans IDE.

    Hi guys I have developed a small swing application in Netbeans IDE. I used the following code inside the IDE for JH.
    public void createHelp()
           try {
                   URL hsURL = new URL("jar:file:eDictionaryHelp.jar!/eDictionaryHelp/eDictionary.hs");
                   hs = new HelpSet(null, hsURL);
           catch (Exception ee)
            // Say what the exception really is
            System.out.println( "HelpSet " + ee.getMessage());
            System.out.println("HelpSet "+ helpHS +" not found");
            JOptionPane.showMessageDialog(new JFrame(), ee.getMessage(), "Error", ERROR_MESSAGE);
            hb = hs.createHelpBroker();
       }When I run the program inside the IDE and and click on the corresponding MenuItem.. JavaHelp comes up as it should! No problems with that.
    But when I build the project and tried to run it from the .jar file in the PROJECT_HOME/dist/ the swing got displayed till this function was called. and then it simply crashed.
    Investigating further and commenting out one line at a time and compiling I found out that whenever the hs = new HelpSet(null, hsURL); is encountered, the app crashes (it doesnt throw any error).
    But as I said this is not the case when i run and compile inside the IDE. I only get this problem when running the app from outside the IDE.
    I have tried all kinds of combinations of the URL .. for eg ( I am aware of Bug 4149782)
    ClassLoader cl = this.getClass().getClassLoader();
    try {
                   URL hsURL = HelpSet.findHelpSet(cl, helpHS);
    .What can be the problem guys? Any suggestions?
    Thanks!

    Anyone has an answer on this?
    I am facing the same problem.. I am using NetBeans 5.5
    arijit_datta, do u have a solution for this problem already?
    Thanks,
    SK

  • Character reordering problem in swing text components  on macintosh

    I have created a swing application that handles devanagari script.(script for Hindi language).The application works perfectly in windows but in apple macintosh
    there is a problem with the reordering of characters in text componets. Reordering means some characters needs to be displayed not in the exact order in which they are stored.I was wondering how this can happen as the application works fine on windows.Also other applications like text editor displays devanagari script correctly on macintosh.
    I tried with several fonts like Arial Unicode MS,Devanagari MT etc/.java

    Very odd. Post your Reordering code.

  • Oracle Jdeveloper 11g R1 has a Bug?-- Swing Application Deploy Error

    Oracle Jdeveloper 11g R1 (11.1.1.2.0) (build 5536)
    1. Create an empty swing application.
    File-->New-->Applications-->Java Desktop Application
    New-->Swing/AWT-->Frame
    2. Project properties--->Deployment: Create new JAR Deployment Profile: test
    3. Edit Deployment Profile: test
    File Groups --->new--->Create File Group (Type: Dependency Analysis) :da
    4. Error: Cannot enter "da"---->contributors , No display (such as "Libraris")
    5. If deploy it (test), I get an Unexpected Error.
    Error Messages:
    Title: StackOverflowError in o.ji.xml.JDevXmlIntergrationUtilsImpl:18
    Performing action Report a Bug...[ from oracle.jdevimpl.uieditor.UIEditorImpl ]
    Invoking command: [ from oracle.jdevimpl.uieditor.UIEditorImpl ]
    Performing action New...[ from oracle.jdevimpl.uieditor.UIEditorImpl ]
    Performing action Show Overview
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Invoking command: Class Generation[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action Project Properties...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action Project Properties...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Invoking command: [ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Uncaught exception
    java.lang.StackOverflowError
    o.ji.xml.JDevXmlIntegrationUtilsImpl.canBeSelected0(JDevXmlIntegrationUtilsImpl.java:18)
    o.ji.xml.JDevXmlIntegrationUtilsImpl.canBeSelected0(JDevXmlIntegrationUtilsImpl.java:18)
    o.ji.xml.JDevXmlIntegrationUtilsImpl.canBeSelected0(JDevXmlIntegrationUtilsImpl.java:18) ......
    When I use Oracle Jdeveloper 10g (10.1.3.4.0) , I can use it to set Libraris.
    I have a swing application need these operation.
    Does anyone can tell me what's the reason?
    Thanks.
    I had tried Oracle JDeveloper 11g R1 (11.1.1.1.0)(Build 5407).
    It is OK.
    Maybe I need to download Oracle JDeveloper 11g (11.1.1.2.0) again.
    Edited by: [email protected] on 2010-2-24 下午4:58
    Edited by: [email protected] on 2010-2-25 下午5:47

    I am encountering the same bug / problem right now.
    Anybody from Oracle who has a workaround for this BUG?
    We are migrating to JDev 11.1.1.2.0 for a client and this bug is still there!
    Any help from the JDev team is highly appreciated!

  • Including images in JAR for Swing Application

    I am using a couple of images in a Swing application. When I create the JAR file I include all the images. The JAR executes fine but the images are missing. When I put the images in the same directory as the JAR file the images are properly displayed.
    The code I use to display the images is:
    JLabel label = new JLabel(new ImageIcon("pleaseWait.gif"));
    Can anyone let me know what I need to do to get the image from the JAR? Do I need to look at ResourseBundle's?
    Thanks for any help..

    Does anybody know what is the reason of my problem??
    I created a package called test in my eclipse env. and in that package I placed folder named graph in which there is a file Help.png.
    Here is all the code I run in eclipse and it runs properly. When I create a jar file (using eclipse wizard) to execute without eclipse it can not execute and shows nothing (process starts and I have to kill it by myself in OS). Maybe there is some mistake with making jar... I do not know
    So let someone try tu run my class or build jar file and try to execute and share his observations (solutions) ??
    package test;
    import java.awt.Toolkit;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.UIManager;
    public class TestWindow extends JFrame {
         private JButton jButton1 = new JButton(new JARImage().getImage("Help.png"));
         public TestWindow() {
              this.getContentPane().add(jButton1);
              this.validate();
              this.setVisible(true);
         private class JARImage {
              protected ImageIcon getImage(String imageName) {
                   ImageIcon image = new ImageIcon();
                   try {
                        image.setImage((Toolkit.getDefaultToolkit().getImage(getClass()
                                  .getResource("graph/" + imageName))));
                   } catch (Exception ex) {
                        System.out.println("Image Error: " + ex);
                        ex.printStackTrace();
                   return image;
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              } catch (Exception e) {
                   e.printStackTrace();
              new TestWindow();
    }

Maybe you are looking for

  • Web services wont work no matter what i do

    got a new laserjet MFP M127FW and everything thus far works except eprint. IF i can get it to enable, it only does so after i reboot (power cycle) the printer. if i try and enable it via the web management it will never say it was enabled, it just cl

  • I need to download Acrobat Pro 9.0 for Mac

    We have a site license for the product but our CD is unusable.   Where can I download this from?

  • Memory card password request after software upgrad...

    Nokia 6700 Requesting Memory card password? I have a Nokia 6700 Classic, the bluetooth stopped working so I called Orange who checked I was following the instructions clearly and then suggested I download the latest software version 13.20  via the co

  • Problem when application is closed using CTRL-C

    When my app is launched it displays a JFrame and connects to a DB. In my GUI I have a windowClosing event handler and also a handler for a Disconnect button which will gracefully close the DB connection befor exiting. However when a user executes fro

  • How to add address of Proxy Server

    When using Safari and other internet applications on the iPhone I cannot access the internet pages on my iPhone but when I use Interenet Explorer on my Windows machine using the same internet address and the the same wifi connection all is OK. The wi