Where did javax.swing.plaf.metal go after 1.4?

Dear Users of the java.swing libraries,
I've made a schoolproject in javax.swing and i am using the javax.swing.plaf.metal.MetalLookAndFeel as LookAndFeel.
The Problem is: it seems sun has removed the Metal LookAndFeel in versions past 1.4 or something like that. I read this in the source DefaultmetalTheme.java file:
* This class describes the default Metal Theme.
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing.  As of 1.4, support for long term storage
* of all JavaBeans<sup><font size="-2">TM</font></sup>
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
* @version 1.25 01/23/03
* @author Steve Wilson
*/Now i wonder, can i find this cool Metal style anywhere else? In like the java.beans that was mentioned in the code of DefaultmetalTheme.java.
In my current situation my project is ruined and i would relly appriciate some feedback on this!
Yours Truthfully,
Alexander Thore

They would only be where you put them.
You should be importing them to your computer regularly as you would with any digital camera, most especially before any update.
If you failed to do this, then they are likely gone.
You can try a restore from backup.

Similar Messages

  • Question to understand javax.swing.plaf.FontUIResource("Arial Unicode MS"..

    Hi Commuity!
    I have an Question about this function!
    javax.swing.plaf.FontUIResource("Arial Unicode MS", Font.PLAIN, 12);
    I have read the Java doc but this didn�t help!
    I wanted to know, what happend, if this Font is not an the Client.
    So i deleted the Font "Arial Unicode MS".
    But the applikation still use this Font. But it is not on my local PC?
    Were do Swing load the Font�s from?
    Are the Fonts included in Java?
    thx a lot
    Florian

    Has got nobody an idea, where swing load the fonts from?

  • Importing  javax.swing.plaf.basic.BasicListUI.MouseInputHandler

    Hi!!
    I have totally no idea why I cannot import javax.swing.plaf.basic.BasicListUI.MouseInputHandler. The compiler says BasicListUI interface is expected.

    Agreed (maybe even so for 1.4.1 that I've just wiped out so I can't cehck my old rt.jar :o).
    For the moment I use my old translation of the basic.properties (and windods.properties) packed in a jar-file placed in
    jreXX/lib/ext/myLanguage.jar
    So far it works for the dialogs in my applications ...
    However, I don't find this a clean solution. I now find basic.class in rt.jar. Juged from all the other basic_xx.class files in rt.jar I guess this is where basic.properties went ... My next move will be to get hands on the source code of JAVA and check out how basic.java looks like ... perhaps this is a class filled with static fields and a simple method that sets properties in memeory or ? or ? ... In particular I need find out if some 'fields' have been added or removed compared to the old basic.properties. If so, the old translation would only be parial and my apps would be a mix of danish and english.
    I'm not really that much of a JAVA programmer and this is just to share some thoughts. Does anyone out there know a central reference on how those of us that speak minority languges easily get translations of core JAVA stuff (meaning Yes, No, Cancel and the like) take effect the easy way? Are there national boards that take care of such business?
    Maybe I haven't searched enough for information - my apologies if you found it waste of time reading this reply.
    With kind regards and thanks in advance, MJTJ

  • Where is javax.swing.GroupLayout Class....?

    In the Java 6 Doc I am getting the information about javax.swing.GroupLayout class. But I cpuld not find the class in Jar.
    Am I missing something?
    It will be appriciated If you help me to finding the Jar file for this class.
    Thanks.

    Thanks for help.
    I have got it. As I am using beta version of Java6 in which that class was missing. In the latest version of JDK , I have found that class.

  • Where did project and event libraries go after installing mavericks? How to restore?

    Recently installed Mavericks.  Now both the event and project libraries are blank.  How can they be restored?

    Are you referring to iPhoto or iMovie?  If it's iPhoto then what version of iPhoto are you running?  Have you updated to iPhoto 9.5? If so what version did you have previously?
    As a first attempt try the following:
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - Run Option #4, Rebuild Database, followed by Option #1 if needed.
    Can't help you with iMovie.
    OT

  • HT1689 Where did my gift card balance go after a credit card purchase

    I had a gift card balance on my account and I didn't want to use it so I put in my credit card. Now the gift card balance is gone. Can I recover it?  I no longer have the card.

    Goforit123 wrote:
    ... Now the gift card balance is gone. ...
    Are you sure that the Purchase did not use a combination of the Gift Card balance and the Credit Card...
    Check your Credit Card Statement to check that...
    OR...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Exception problems utilizing javax.swing.UIManager

    I am in the process of creating a simple console environment for a certain application that runs in windows mainly but programmed in Java. Am trying to set the LookAndFeel to windows but it keeps throwing a java.lang.ClassNotFoundException_.
    try {
            javax.swing.UIManager.setLookAndFeel("com.sun.java.plat.windows.WindowsClassicLookAndFeel");
    } catch (Exception e) { System.err.println("Error: "+e); }After thinking I just simply didn't have the package installed correctly I wrote a simple app to check...
    public static void main(String[] args) {
         javax.swing.UIManager.LookAndFeelInfo[] info = javax.swing.UIManager.getInstalledLookAndFeels();
         for(int i=0; i<info.length;i++){
              String LFname = info.getName();
              String className = info[i].getClassName();
              System.out.println(LFname+" : "+className);
    }This gave me the output...Metal : javax.swing.plaf.metal.MetalLookAndFeel
    CDE/Motif : com.sun.java.swing.plaf.motif.MotifLookAndFeel
    Windows : com.sun.java.swing.plaf.windows.WindowsLookAndFeel
    Windows Classic : com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeelSo I can only assume that I have the the necessary resources installed correctly. Any thoughts on what might be causing my problem?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    So I can only assume that I have the the necessary resources installed correctly. Any thoughts on what might be causing my problem?
    com.sun.java.plat.windows.WindowsClassicLookAndFeel // the class you're trying to set
    com.sun.java.plaf.windows.WindowsClassicLookAndFeel // the class that is actually availableSee the difference?
    ~

  • Javax.swing.KeyStroke

    When i use Swing with PJ i get some errors about javax.swing.KeyStroke:
    java.lang.NoSuchFieldException
    at java.lang.Class.getField()
    at javax.swing.KeyStroke.getKeyStroke()
    at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults()
    at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults()
    at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults()
    at javax.swing.UIManager.setLookAndFeel()
    at javax.swing.UIManager.setLookAndFeel()
    at javax.swing.UIManager.initializeDefaultLAF()
    at javax.swing.UIManager.initialize()
    at javax.swing.UIManager.maybeInitialize()
    at javax.swing.UIManager.getUI()
    at javax.swing.JPanel.updateUI()
    at javax.swing.JPanel.<init>()
    at javax.swing.JPanel.<init>()
    at javax.swing.JRootPane.createGlassPane()
    at javax.swing.JRootPane.<init>()
    at javax.swing.JFrame.createRootPane()
    at javax.swing.JFrame.frameInit()
    at javax.swing.JFrame.<init>()
    java.lang.Error: Unrecognized keycode name: VK_KP_LEFT
    at javax.swing.KeyStroke.getKeyStroke()
    at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults()
    at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults()
    at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults()
    at javax.swing.UIManager.setLookAndFeel()
    at javax.swing.UIManager.setLookAndFeel()
    at javax.swing.UIManager.initializeDefaultLAF()
    at javax.swing.UIManager.initialize()
    at javax.swing.UIManager.maybeInitialize()
    at javax.swing.UIManager.getUI()
    at javax.swing.JPanel.updateUI()
    at javax.swing.JPanel.<init>()
    at javax.swing.JPanel.<init>()
    at javax.swing.JRootPane.createGlassPane()
    at javax.swing.JRootPane.<init>()
    at javax.swing.JFrame.createRootPane()
    at javax.swing.JFrame.frameInit()
    at javax.swing.JFrame.<init>()
    Could someone help me?

    Refer to the bug database (bugid = 4309057)
    http://developer.java.sun.com/developer/bugParade/bugs/4309057.html
    Here the workaround:
    Fix the problem yourself by changing SwingUtilites to test for "Class.getPackage" which is 1.2 specific and has not been introduced to pJava:
    Method m = Class.class.getMethod("getPackage", null);Re-Jar the swingclasses and enjoy your Swing application running on PersonalJava....
    Herbie

  • Exception at javax.swing.UIManager.setLookAndFeel(UIManager.java:435)

    Only in one machine (AIX 5.2 with J2RE 1.3.1 IBM) I got the following exception:
    "main" (TID:0x300C19D8, sys_thread_t:0x3003EF58, state:R, native ID:0x1) prio=5
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:105)
         at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:82)
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Class.java:262)
         at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:72)
         at java.awt.Font.initializeFont(Font.java:285)
         at java.awt.Font.<init>(Font.java:319)
         at javax.swing.plaf.FontUIResource.<init>(FontUIResource.java:51)
         at javax.swing.plaf.basic.BasicLookAndFeel.getFont(BasicLookAndFeel.java:252)
         at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:271)
         at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:210)
         at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:80)
         at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1088)
         at javax.swing.UIManager.setLookAndFeel(UIManager.java:408)
         at javax.swing.UIManager.setLookAndFeel(UIManager.java:435)
    Other machine works fine.
    Any suggestion?
    Grazie

    So I can only assume that I have the the necessary resources installed correctly. Any thoughts on what might be causing my problem?
    com.sun.java.plat.windows.WindowsClassicLookAndFeel // the class you're trying to set
    com.sun.java.plaf.windows.WindowsClassicLookAndFeel // the class that is actually availableSee the difference?
    ~

  • Where did my notes go after my mountain lion upgrade?

    I just upgraded to mountain lion. I'm not using the cloud yet. I opened notes on the dock and it's empty. Where did all of my notes go after the upgrade. I really need that information Can anyone help me find my notes and get them into the  new notes folder.
    Thanks, ervernon

    I found that the iPhone appeared to have finished syncing, but in fact the apps were still being copied back to the phone from iTunes. If you wait a while (with the phone connected to your computer), you may find that they just keep appearing. Mine took about 30 mins.

  • WARNING: No saved state for javax.swing.JTable

    Hi All,
    I have a JTable component in my code and I used Netbeans to add swing components. However, I get this warning after I run my app:
    WARNING: No saved state for javax.swing.JTable[jTable1,0,0,329x80,alignmentX=0.0,alignmentY=0.0,border=,
            flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,
            autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,
            editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],
            preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,
            rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=51,g=153,b=255],
            selectionForeground=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],showHorizontalLines=true,
            showVerticalLines=true]What is the reason of this? If I need to catch this exception, how can I add it with netbeans?
    Edited by: Darryl Burke -- broke a long line into several lines

    Set the name property of your JTable, it's a Netbeans thing, rather than a Java problem. table.setName("MyTable");Have a look at this thread for details: SessionStorage warning while program is running
    Please only post Java related questions here and post Netbeans questions to a netbeans forum/mailing list, thanks.

  • Javax.swing.text.TableView bug in 1.4 beta 2 ?

    Hi,
    I derived a class from TableView, which worked fine with 1.3, but now causes the following exception as soon as being layouted:
    java.lang.Error: should not happen: class com.lexetius.swing.text.LexTableView
    at javax.swing.text.BoxView.baselineLayout(Unknown Source)
    at javax.swing.text.ParagraphView$Row.layoutMinorAxis(Unknown Source)
    at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
    at javax.swing.text.BoxView.layout(Unknown Source)
    at javax.swing.text.BoxView.setSize(Unknown Source)
    at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
    at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
    at javax.swing.text.BoxView.layout(Unknown Source)
    at javax.swing.text.FlowView.layout(Unknown Source)
    at javax.swing.text.BoxView.setSize(Unknown Source)
    at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
    at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
    at javax.swing.text.BoxView.layout(Unknown Source)
    at javax.swing.text.BoxView.setSize(Unknown Source)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
    at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(Unknown Source)
    at javax.swing.JComponent.getPreferredSize(Unknown Source)
    at javax.swing.JEditorPane.getPreferredSize(Unknown Source)
    at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
    at java.awt.Container.layout(Unknown Source)
    at java.awt.Container.doLayout(Unknown Source)
    at java.awt.Container.validateTree(Unknown Source)
    at java.awt.Container.validate(Unknown Source)
    at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknow
    n Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)
    any ideas???

    I wrote the com.lexetius.swing.text.LexTableView component myself. It is derived directly from javax.swing.text.TableView and it adds virtually no functionality. I'm quite sure, the problem comes from the TableView class, but I can't verify that directly, since this class is abstract (why is that, anyway??).
    It would certainly help me very much, if anybody had a component, which is also derived from javax.swing.text.TableView and works with the 1.4 beta.

  • [HELP! ] why my program thows a javax.swing.text.ChangedCharSetException?

    there's the source:
    import java.io.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.border.*;
    class HTMLMagician extends JFrame
         protected static final String APP_NAME="HTML Magician V1.0 Produced By V Studio";
         protected JTextPane hm_textPane;
         protected StyleSheet hm_styleSheet;
         protected HTMLEditorKit html_kit;
         protected HTMLDocument html_document;
         protected JMenuBar hm_menuBar;
         protected JToolBar hm_toolBar;
         protected JFileChooser hm_fileChooser;
         protected File current_file;
         protected boolean text_changed=false;
         public HTMLMagician()
              super(APP_NAME);
              setSize(800,600);
              getContentPane().setLayout(new BorderLayout());
              produceMenuBar();
              hm_textPane=new JTextPane();
              html_kit=new HTMLEditorKit();
              hm_textPane.setEditorKit(html_kit);
              JScrollPane textPane_scrollPane=new JScrollPane();
              textPane_scrollPane.getViewport().add(hm_textPane);
              getContentPane().add(textPane_scrollPane,BorderLayout.CENTER);
              hm_fileChooser=new JFileChooser();
              javax.swing.filechooser.FileFilter hm_filter=new javax.swing.filechooser.FileFilter()
                   public boolean accept(File pathname)
                        if(pathname.isDirectory())
                             return true;
                        String ext_name=pathname.getName().toLowerCase();
                        if(ext_name.endsWith(".htm"))
                             return true;
                        if(ext_name.endsWith(".html"))
                             return true;
                        if(ext_name.endsWith(".asp"))
                             return true;
                        if(ext_name.endsWith(".jsp"))
                             return true;
                        if(ext_name.endsWith(".css"))
                             return true;
                        if(ext_name.endsWith(".php"))
                             return true;
                        if(ext_name.endsWith(".aspx"))
                             return true;
                        if(ext_name.endsWith(".xml"))
                             return true;
                        if(ext_name.endsWith(".txt"))
                             return true;
                        return false;
                   public String getDescription()
                        return "HTML files(*.htm,*.html,*.asp,*.jsp,*.css,*.php,*.aspx,*.xml)";
              hm_fileChooser.setAcceptAllFileFilterUsed(false);
              hm_fileChooser.setFileFilter(hm_filter);
              try
                   File dir=(new File(".")).getCanonicalFile();
                   hm_fileChooser.setCurrentDirectory(dir);
              }catch(IOException ex)
                   showError(ex,"Error openning current directory");
              newDocument();
              WindowListener action_winClose=new WindowAdapter()
                   public void windowClosing(WindowEvent evt)
                        if(!promptToSave())
                             return;
                        System.exit(0);
              addWindowListener(action_winClose);
              setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              setVisible(true);
         protected void produceMenuBar()
              hm_menuBar=new JMenuBar();
              hm_toolBar=new JToolBar();
              JMenu menu_file=new JMenu("File");
              menu_file.setMnemonic('f');
              ImageIcon icon_new=new ImageIcon("imgs/file.gif");
              Action action_new=new AbstractAction("New",icon_new)
                   public void actionPerformed(ActionEvent evt)
                        if(!promptToSave())
                             return;
                        newDocument();
              JMenuItem item_new=new JMenuItem(action_new);
              item_new.setMnemonic('n');
              item_new.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,InputEvent.CTRL_MASK));
              menu_file.add(item_new);
              JButton button_new=hm_toolBar.add(action_new);
              ImageIcon icon_open=new ImageIcon("imgs/folder_open.gif");
              Action action_open=new AbstractAction("Open...",icon_open)
                   public void actionPerformed(ActionEvent evt)
                        if(!promptToSave())
                             return;
                        openDocument();
              JMenuItem item_open=new JMenuItem(action_open);
              item_open.setMnemonic('o');
              item_open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,InputEvent.CTRL_MASK));
              menu_file.add(item_open);
              JButton button_open=hm_toolBar.add(action_open);
              ImageIcon icon_save=new ImageIcon("imgs/floppy.gif");
              Action action_save=new AbstractAction("Save",icon_save)
                   public void actionPerformed(ActionEvent evt)
                        saveAs(false);
              JMenuItem item_save=new JMenuItem(action_save);
              item_save.setMnemonic('s');
              item_save.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,InputEvent.CTRL_MASK));
              menu_file.add(item_save);
              JButton button_save=hm_toolBar.add(action_save);
              Action action_saveAs=new AbstractAction("Save As...")
                   public void actionPerformed(ActionEvent evt)
                        saveAs(true);
              JMenuItem item_saveAs=new JMenuItem(action_saveAs);
              item_saveAs.setMnemonic('a');
              item_saveAs.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,InputEvent.CTRL_MASK));
              menu_file.add(item_saveAs);
              menu_file.addSeparator();
              Action action_close=new AbstractAction("Quit")
                   public void actionPerformed(ActionEvent evt)
                        if(!promptToSave())
                             return;
                        System.exit(0);
              JMenuItem item_exit=new JMenuItem(action_close);
              item_exit.setMnemonic('q');
              item_exit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,InputEvent.CTRL_MASK));
              menu_file.add(item_exit);
              hm_menuBar.add(menu_file);
              setJMenuBar(hm_menuBar);
              getContentPane().add(hm_toolBar,BorderLayout.NORTH);
         protected String getDocumentName()
              return current_file==null ? "Untitled" : current_file.getName();
         protected void newDocument()
              html_document=(HTMLDocument)html_kit.createDefaultDocument();
              hm_styleSheet=html_document.getStyleSheet();
              hm_textPane.setDocument(html_document);
              current_file=null;
              setTitle(getDocumentName()+" - "+APP_NAME);
              Runnable runner=new Runnable()
                   public void run()
                        text_changed=false;
                        html_document.addDocumentListener(new action_textChanged());
              SwingUtilities.invokeLater(runner);
         protected void openDocument()
              if(hm_fileChooser.showOpenDialog(HTMLMagician.this)!=JFileChooser.APPROVE_OPTION)
                   return;
              File f=hm_fileChooser.getSelectedFile();
              if(f==null || !f.isFile())
                   return;
              current_file=f;
              setTitle(getDocumentName()+" - "+APP_NAME);
              HTMLMagician.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
              try
                   InputStream in=new FileInputStream(current_file);
                   html_document=(HTMLDocument)html_kit.createDefaultDocument();
                   html_kit.read(in,html_document,0);
                   hm_styleSheet=html_document.getStyleSheet();
                   hm_textPane.setDocument(html_document);
                   in.close();
              }catch(Exception ex)
                   showError(ex,"Error openning file "+current_file);
              HTMLMagician.this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
              Runnable runner=new Runnable()
                   public void run()
                        text_changed=false;
                        html_document.addDocumentListener(new action_textChanged());
              SwingUtilities.invokeLater(runner);
         protected boolean saveAs(boolean as)
              if(!as && !text_changed)
                   return true;
              if(as || current_file==null)
                   if(hm_fileChooser.showSaveDialog(HTMLMagician.this)!=JFileChooser.APPROVE_OPTION)
                        return false;
                   File f=hm_fileChooser.getSelectedFile();
                   if(f==null || !f.isFile())
                        return false;
                   current_file=f;
                   setTitle(getDocumentName()+" - "+APP_NAME);
              HTMLMagician.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
              try
                   OutputStream out=new FileOutputStream(current_file);
                   html_kit.write(out,html_document,0,html_document.getLength());
                   out.close();
              }catch(Exception ex)
                   showError(ex,"Error saving file "+current_file);
              HTMLMagician.this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
              return true;
         protected boolean promptToSave()
              if(!text_changed)
                   return true;
              int result=JOptionPane.showConfirmDialog(this,"Save change to "+getDocumentName(),APP_NAME,JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.INFORMATION_MESSAGE);
              switch(result)
                   case JOptionPane.YES_OPTION:
                        if(!saveAs(false))
                             return false;
                        return true;
                   case JOptionPane.NO_OPTION:
                        return true;
                   case JOptionPane.CANCEL_OPTION:
                        return false;
              return true;
         protected void showError(Exception ex,String message)
              ex.printStackTrace();
              JOptionPane.showMessageDialog(this,message,APP_NAME,JOptionPane.WARNING_MESSAGE);
         public static void main(String[] args)
              new HTMLMagician();
         class action_textChanged implements DocumentListener
              public void changedUpdate(DocumentEvent evt)
                   text_changed=true;
              public void insertUpdate(DocumentEvent evt)
                   text_changed=true;
              public void removeUpdate(DocumentEvent evt)
                   text_changed=true;
    when i open a .html file,the command output :
    javax.swing.text.ChangedCharSetException
         at javax.swing.text.html.parser.DocumentParser.handleEmptyTag(Unknown Source)
         at javax.swing.text.html.parser.Parser.startTag(Unknown Source)
         at javax.swing.text.html.parser.Parser.parseTag(Unknown Source)
         at javax.swing.text.html.parser.Parser.parseContent(Unknown Source)
         at javax.swing.text.html.parser.Parser.parse(Unknown Source)
         at javax.swing.text.html.parser.DocumentParser.parse(Unknown Source)
         at javax.swing.text.html.parser.ParserDelegator.parse(Unknown Source)
         at javax.swing.text.html.HTMLEditorKit.read(Unknown Source)
         at javax.swing.text.DefaultEditorKit.read(Unknown Source)
         at HTMLMagician.openDocument(HTMLMagician.java:222)
         at HTMLMagician$4.actionPerformed(HTMLMagician.java:128)
         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.pumpOneEventForHierarchy(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)
    why? what's wrong? thanks

    The DocumentParser seems to throw a ChangedCharSetException if it finds a "http-equiv" meta tag for "content-type" or "charset" and if the parser's "ignoreCharSet" property is set to false on creation.

  • Javax.swing.JFileChooser -- open button change current directory... Why?

    Hello community.
    I use javax.swing.JFileChooser class. After press open button, JFileChooser change current directory. Why?
    I was not find in documentation about changing curret directiry by JFileChooser. Take me please reference to doc for understanding this effect.
    Thank you.

    This is my code:
    private void jFileChooser1ActionPerformed(java.awt.event.ActionEvent evt) {                                             
    // TODO add your handling code here:
    // label1.setText("3: "+evt.);
    // label1.setText("3: ");
    label1.setText(evt.getActionCommand());
    System.out.println(evt.getActionCommand());
    if (evt.getActionCommand().startsWith("Approve")){
    label1.setText("You push Open key");
    System.out.println(jFileChooser1.getCurrentDirectory().getPath());
    label1.setText(jFileChooser1.getCurrentDirectory().getPath());
    }else{
    label1.setText("You push Close key");
    I not add method for change current directory. But after press on open button javax.swing.JFileChooser class was change current directory.

  • I installed Snow Leopard when it first came out but now my mac says it has os x 10.5.x.  Where did snow leopard go?

    I installed Snow Leopard when it first came out but now my mac says it has os x 10.5.x.  Where did snow leopard go?

    Hi, after a little more looking, I think your response might lead me to a solution.  It looks like the Snow Leopard install package is on my MacBook Pro hard drive but apparently something isn't right because I'm still running 10.5.  I found something called 10.6 Install Package or something like that and clicked on it.  It asked me where I wanted to install it and I said on the MacBook Pro hard drive in a new folder called Snow Leopard.  It told me the installation was successful.  I then restarted the computer but it is still using 10.5.  Any suggestions on what to do now?

Maybe you are looking for