An icon completely changes a JButton's UI

This is a Java developer question. I could not elsewhere to ask. Already checked ADC.
An Aqua JButton appears correctly in a Java 1.6.0 JFrame. But when I add an icon to the JButton, it is no longer an Aqua JButton. Not sure what is painting it, but it is really ugly.
My question is "Does Apple support icons in JButton and other Java UI components?"
Thank you,
Don Leckie

I could not elsewhere to ask.
http://discussions.apple.com/category.jspa?categoryID=164

Similar Messages

  • Why does my Macintosh HD icon keep changing?

    It seems that every now and then when I log in, my hard drive icon has changed to something strange.
    So far I've had a house, and a filing cabient.
    This isn't a serious problem, I'm just wondering whether it's just my computer, or a bug in Lion.
    I haven't looked very far, so if this has already been asked, sorry in advance!

    I would try  Rebuilding LaunchServices Database and see if this sorts your problem.
    Unplug all periphery devices USB/FireWire etc.
    Open the Terminal application in your Utilities folder. At the prompt copy &paste in the following command in its entirety:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    hit return and let the process run it's course,  it will put you back out at the prompt when complete.
    restart your mac.

  • HT1529 The latest version of iTunes has completely changed my ability to access my iTunes.  I can no longer burn a CD that will play on anything other than another computer.

    The latest version of iTunes has completely changed the format and also why will it not allow me to burn a CD compatible with other devices?

    I'm using iTunes 11.1.1 on a Mac mini running OS 10.7.5 and I burn CDs which play in this machine's external optical drive, my car, and the Pioneer audio CD players downstairs.  I typically use Verbatim recordble CDs. After selecting the playlist I want to burn, I make sure that "Audio CD" is selected - this has always been the default for me.  If this isn't working for you, I don't know what to say - but I'd suspect the drive you're using to burn CDs is getting wonky.
    Good luck
    srb

  • VERY Disappointed-just upgraded from 12 to 13 and the functionality of the Organizer has completely changed

    I have been a long time user of Photoshop elements/Premier and I just loaded version 13 (from 12) and they have completely changed the functionality of the organizer!  OMG!!!!!  You can no longer move a picture easily in the albums and you MUST use one of the Adobe preset backgrounds for a slide show.  Really???  Generally I like the templates for certain uses but I am creating long movies of travels.  I do NOT want your backgrounds, but apparently I have no choice.  And I can no longer interface with Premier - then why did you sell them to me as a package?
    I am sure I can't get my money back because I did a direct download but I have uninstalled the program and gone back to version 12 - BUYER BEWARE if you have been using Premier with the organizer it will not work seamlessly.  Such a disappointment because a good and generally well functioning program has been butchered.  .

    I've just looked to buy iCab as people have suggested but reviews suggest it doesn't work reliably since IOS5.
    Frankly I feel cheated and I've been a historic fan since having an Apple IIci 20 years ago. A major plus point in iPad usability has gone. Funilly enough I was about to recommend 25 iPads as Safari was so useable and the users I had in mind having seen my iPad were keen. But I couldn't hand on heart recommend iPads now and after seeing how Apple drops key functionality and usability wouldn't trust this supplier. Guess I'm glad I didn't recommend them and then have this happen.
    And if I want tabs I'd have gone with Andriod for half the price.
    It wouldn't be so bad if I could reverse the upgrade.
    Anyone know how to cheat the system?

  • My hard drive desktop suddenly will no longer hold or maintain the icons in place when I shut down and restart.  The icons all change positions, alphabetically.  Just started happening.  Any thoughts?

    My hard drive desktop suddenly will no longer hold or maintain the icons in place when I shut down and restart.  The icons all change positions, alphabetically.  Just started happening.  I prefer the icons to a list format.  Concerned this might be a symptom of a larger problem.  Any thoughts?
    revmandan

    It's normal for the icons at the top level of the startup disk to revert to the same arrangement every time the Finder is relaunched. If it's important to you to arrange those icons in a persistent way, proceed as follows.
    Back up all data.
    Open the Info window on the startup disk (labeled "Macintosh HD" unless you gave it another name.) Click the lock icon in the lower right corner of the dialog and authenticate.
    In the Sharing & Permissions section, click the plus-sign button to add an entry to the access list. Give yourself "Read and Write" access. This will be a temporary change. Leave the dialog open.
    Open the Finder window and arrange the icons as you wish, then close the window.
    In the Info dialog, use the minus-sign button to delete the entry you just added to the access list. Don't change anything else. When you're done, it should be the same as when you started. Close the Info dialog.

  • Indesign File Icon has changed to generic looking icon

    I just upgraded to Adobe Indesign CC and now all of my file icons have turned into a white, generic-looking icon.  Can anyone tell me how to get the icon to look like the Indesign icon again?  Thanks in advance.
    David

    I have a similar question.  We installed ID CS6 a few weeks ago, and when looking at files, I could determine which version of ID to open the files in by the different icons for CS4 and CS6.  Overnight, all of my icons have changed to a white box with a purple/pink square with ID in the middle, no matter which version the files were saved in.  Because we have to proofread any documents that move from CS4 to CS6 before using them (and don't have the time to do that with each document), it was very helpful to know which version to open the file in before opening it and finding that it was opened with the wrong version and having to start over again.  We are on Windows 7 PCs.  Any help you could give us would be appreciated.  We still have both versions of ID on our PCs.  Here is a screen shot that might help:

  • HT201365 Hello, I just downloaded IOS 7   The Icons have changed   How can I restore the original ones?

    Hello  I just downloaded IOS 7 on my iphone 4s   The icons have changed and I would like to know how retore them to the original forms?

    Hi,
    I you cannot go back to the previous set of icons, they are embedded in the iOS and an important part of the new set of features.
    HTH

  • Icon was changed to default icon when editting a node on JTree

    I have a tree with icon on nodes. However, when I edit the node, the icon is changed to default icon.
    I don't known how to write the treeCellEditor to fix that one.
    The following is my code:
    package description.ui;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.ToolTipManager;
    import javax.swing.WindowConstants;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    public class Tree extends javax.swing.JPanel {
         private JTree tree;
         private JScrollPane jScrollPane1;
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              frame.getContentPane().add(new Tree());
              frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
              frame.pack();
              frame.show();
         public Tree() {
              super();
              initGUI();
         private void initGUI() {
              try {
                   BorderLayout thisLayout = new BorderLayout();
                   this.setLayout(thisLayout);
                   setPreferredSize(new Dimension(400, 300));
                    jScrollPane1 = new JScrollPane();
                    this.add(jScrollPane1, BorderLayout.CENTER);
                        DefaultMutableTreeNode rootNode = createNode();
                        tree = new JTree(rootNode);
                        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
                        jScrollPane1.setViewportView(tree);
                        ToolTipManager.sharedInstance().registerComponent(tree);
                        MyCellRenderer cellRenderer = new MyCellRenderer();
                        tree.setCellRenderer(cellRenderer);
                        tree.setEditable(true);
                        tree.setCellEditor(new DefaultTreeCellEditor(tree, cellRenderer));
                        //tree.setCellEditor(new MyCellEditor(tree, cellRenderer));
              } catch (Exception e) {
                   e.printStackTrace();
         private void btRemoveActionPerformed(ActionEvent evt) {
             TreePath path = tree.getSelectionPath();
             DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLastPathComponent();
             ((DefaultTreeModel)tree.getModel()).removeNodeFromParent(selectedNode);
         private DefaultMutableTreeNode createNode() {
             DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Doc");
             DefaultMutableTreeNode ch1 = createChuongNode(rootNode, "Ch1");
             DefaultMutableTreeNode ch2 = createChuongNode(rootNode, "Ch2");
             createTextLeafNode(ch1, "title");
             return rootNode;
         private DefaultMutableTreeNode createChuongNode(DefaultMutableTreeNode parent, String name) {
             DefaultMutableTreeNode node = new DefaultMutableTreeNode(new ChapterNodeData(name));
             parent.add(node);
             return node;
         private DefaultMutableTreeNode createTextLeafNode(DefaultMutableTreeNode parent, String name) {
             DefaultMutableTreeNode node = new DefaultMutableTreeNode(new TitleNodeData(name));
             parent.add(node);
             return node;
          private class MyCellRenderer extends DefaultTreeCellRenderer {
                 ImageIcon titleIcon;
                 ImageIcon chapterIcon;
                 public MyCellRenderer() {
                     titleIcon = new ImageIcon(getClass().getClassLoader()
                            .getResource("description/ui/icons/Text16.gif"));
                     chapterIcon = new ImageIcon(getClass().getClassLoader()
                            .getResource("description/ui/icons/Element16.gif"));
                 public Component getTreeCellRendererComponent(
                                     JTree tree,
                                     Object value,
                                     boolean sel,
                                     boolean expanded,
                                     boolean leaf,
                                     int row,
                                     boolean hasFocus) {
                     super.getTreeCellRendererComponent(
                                     tree, value, sel,
                                     expanded, leaf, row,
                                     hasFocus);
                     if (isChapterNode(value)) {
                         setIcon(chapterIcon);
                         setToolTipText("chapter");
                     } else if (isTextLeafNode(value)) {
                         setIcon(titleIcon);
                         setToolTipText("title");
                     return this;
                 protected boolean isChapterNode(Object node) {
                     return ((DefaultMutableTreeNode)node).getUserObject() instanceof ChapterNodeData;
                 protected boolean isTextLeafNode(Object node) {
                     return ((DefaultMutableTreeNode)node).getUserObject() instanceof TitleNodeData;
          private class MyCellEditor extends DefaultTreeCellEditor {
                 ImageIcon titleIcon;
                 ImageIcon chapterIcon;
              public MyCellEditor(JTree tree, DefaultTreeCellRenderer renderer) {
                  super(tree, renderer);
                  titleIcon = new ImageIcon(getClass().getClassLoader()
                         .getResource("description/ui/icons/Text16.gif"));
                  titleIcon = new ImageIcon(getClass().getClassLoader()
                         .getResource("description/ui/icons/Element16.gif"));
              public Component getTreeCellEditorComponent(
                           JTree tree,
                           Object value,
                           boolean isSelected,
                           boolean expanded,
                           boolean leaf,
                           int row) {
                  super.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row);
                  return this.editingComponent;
          abstract class NodeData{
              String name;
              public NodeData(String name) {
                  this.name = name;
              public String getName() {
                  return name;
              public void setName(String name) {
                  this.name = name;
              public String toString() {
                  return name;
          class ChapterNodeData extends NodeData {
              public ChapterNodeData(String s) {
                  super(s);
          class TitleNodeData extends NodeData {
              public TitleNodeData(String attr) {
                  super(attr);
    }

    Arungeeth wrote:
    I know the name of the node... but i cant able to find that nodeHere is some sample code for searching and selecting a node:
        TreeModel model = jtemp.getModel();
        if (model != null) {
            Object root = model.getRoot();
            search(model, root, "Peter");//search for the name 'Peter'
            System.out.println(jtemp.getSelectionPath().getLastPathComponent());
        } else {
            System.out.println("Tree is empty.");
    private void search(TreeModel model, Object o, String argSearch) {
        int cc;
        cc = model.getChildCount(o);
        for (int i = 0; i < cc; i++) {
            DefaultMutableTreeNode child = (DefaultMutableTreeNode) model.getChild(o, i);
            if (model.isLeaf(child)) {
                TreeNode[] ar = child.getPath();
                String currentValue = Arrays.toString(ar);
                if (currentValue.contains(argSearch)) {
                    jtemp.setSelectionPath(new TreePath(ar));
            } else {
                search(model, child, argSearch);
    }

  • Appearance has completely changed and can no longer purchase music

    Hello, I have recently upgraded to the latest version of Itunes and the Itunes store appearance has completely changed and rendered Itunes essentially useless. I only get a white column with a hypertext link that says powersearch and then it asks me to list artist, album, song, etc. If I am lucky enought to find a single that I want, then when I click on it, I literally go nowhere. Is there a preference setting that I am missing? Please help as I cannot purchase any music at all.

    iTunes 9 requires Safari 4.0.5 to access the iTunes Store. If you don't use Safari, it still has to be present for iTunes to use it for store access. If you don't have Safari, that may be your problem. Get it here: http://www.apple.com/safari/download/

  • File Icons have changed

    I just noticed that all of my pdf file icons have changed to the iTunes icon.
    Would anyone have any idea why this may have happened and how to change them back?
    There are no problems with opening or viewing the files - they still open in Preview - but in the Finder they show up as the iTunes icon? Any ideas?
    Thanks,
    AK

    akpud wrote:
    Great suggestion - thanks! It did change the icon globally - but then when I switched it back to Preview - it went back to the 'iTunes' icon.
    Where can I go to change the Preview icon (which is probably want's broken)?
    Preview icon is kept inside Preview application package. control-click on Preview.app and select "show package contents". go to Contents->Resources. the file is called preview.icns. However, there is no way that file got substituted by the itunes icon. Morte likely something is wrong with the Launch services database.
    Try the following. delete the file homedirectory/library/preferences/com.apple.LaunchServices.plist and log out/in. if that doesn't help run the following command in terminal
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

  • Illustrator icons keep changing to a PDF icon?

    Anybody know?
    Why does my illustrator icon keep changing to a PDF icon each time i make a change to a file?
    The only way I can get it back is to make a change to the title then change it back again.
    Using illustrator CS3 and the latest adobe acrobat
    Thanks Sarah

    illustrator CS3 itself, or the files it makes?

  • The ackground and icon colors changed on my ipad. how do i change them back ?

    the background and icon colors changed on my ipad. how do i change them back ?

    that fixed it. thanks a bunch. what did i do to change it ? all i did was turn it off, when i turned it back on it was in "white on black " mode.

  • IPhoto Library icon has changed

    Yesteday, I updated my iMac (Late 2009) to Mountain Lion (10.8.2) and installed the newest version of iPhoto (9.4.1).
    All seemed to be working well until a few hours ago. Things I have noticed:
    1)  The iPhoto Library icon has changed to a pink flower (although the iPhoto application icon and the iPhoto dock icon have stayed at the usual (sun/camera/palm tree).
    2)  iPhoto is taking about 12 seconds to quit (I have about 8,000 photos)
    3)  Keywords is behaving strangely - some photos have keywords attached to them which I haven't put there (some of the time) and sometimes the keyword list (command K) shows up with none of my keywords.
    4) This one might be my imagination but the font used for the folders/albums looks a bit different than it used to.....!
    Hope someone can help!
    Regards

    1 and 4: Nothing unusual there, Apple change these things around from time to time.
    2 and 3:
    Back up.
    Option 1
    Try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 
    Regards
    TD 

  • Icon have changed to preview icons

    Hi.I use PEAK as an audio editor which uses its own file icon.Just recently all my normal peak icons suddenly changed in to what I guess must be Preview icons,the ones with the semi-quaver,a bit like itunes. Also every time I save something in peak the original peak icon changes. I have set the files to open in peak in the get info but it still makes no difference. Any ideas why and how can I stop this! Thanks,Tony

    Ok, this is happening every time I launch Photoshop, the Layer Panel options "Show thumbnails" box is turned off by default, and I have to go in and turn it on again each time.
    I recall recently that an AppleCare support tech, in an effort to fix some Mac Mail issues, had me throw away a folder in the Library, maybe Prefs?, and restart. This is the only thing I've done to my system in recent memory. No upgrades, no new apps, nothing else i can come up with...
    Would really like to resolve this! Any ideas? thanks

  • After installing Windows 7 my desktop Adobe icons have change in appearance. How do I change them back?

    After installing Windows 7 my desktop Adobe icons have change in appearance. How do I change them back?

    The file icons is one on the change features MS removed from the Explorer options. Supposedly you can do the change with the registry, though I have not figured out that option. If you want to try, backup the registry first and then you might try the instructions at How to Change a File Type Icon in Windows 7 and Vista - The Winhelponline Blog. If the application icon is not correct, try to fix that before the approach above. Good luck and be careful (dealing with the registry can make your computer not work..

Maybe you are looking for

  • How many lines can you have?

    how do get the two family plans or separate individual line?

  • Hey everyone, I need urgent help with a vfx shot. Please anyone!

    http://www.youtube.com/watch?v=JReojFkK53M&feature=channel_video_title At the time marker 2:19. It is a sort of Force Kick. I need to know how to make the victim fly back like in this video. I understand how to do the motion blur and the lens flare w

  • Trialware Installation Restarts Over and Over

    Hello, I have attempated to install the Captivate Trialware. All appears to work correctly but everytime I attempt to use the program I get the “Please wait while Windows configures Macromedia Captivate” window and progress bar shows up several times

  • How I can put 5.1 surround sound in premiere pro?

    How to do 7.1 surround sound but I realized that only accepts premiere pro 5.1, but I want to know how to put that type of audio in premiere pro

  • Thread deadlocked on itself?

    Hi, we have a production server, where threads become occassionally unresponsive. At that time, we take a thread dump. A few of those thread dumps show a thread is waiting to lock an object. Strangely, a few lines down in the stack trace, the same th