1. Why does my icon handling code throw a NullPointerException? stackoverflow.comI have added an image for my button,but when I run that frame this exception will be thrown .why?please help me.
|
2. Information icon stackoverflow.comI would like to make use in a normal JDialog of the information icon provided by the JOptionPane.INFORMATION_MESSAGE. Is it possible? |
3. Swing Icons coderanch.com |
4. Image Icons coderanch.comHi Vicky, your code seems to be correct. the problem may be that it is not getting the file france.gif. make sure the file exists.and try giving the complete path. You may wonder but there is no exception generated if the program does not find the image file in specified location. regards deekasha |
5. Icon - coderanch.comI made some images for the icon of my program, they look fantastic in fireworks but seem to turn out looking really bad when I use them for the icon, is there a best practices guide for making these types of icons? I make the images at 16X16 and save them in gif format. |
6. Icons coderanch.comYou could always check out the icons used by some open source projects on sourceforge or freshmeat. Just download the source code and browse through the folders. Most of these apps are GPL, so if you intend for your program to be commercial, make sure you get permission before using the icons. |
7. More Images for Icons coderanch.com |
8. Icons... coderanch.comHi, I'm having a bit of a problem: I've created a JTree with checkboxes as the nodes, and in addition, I'm tyring to remove the default icons at the nodes and replace them with my own. However, when I then try to get the path of a node selection, I'm getting the following: Selected: BasicTreeNode@401369 ->BasicTreeNode@2e533a->BasicTreeNode@401369 Selected: BasicTreeNode@a0544 ->BasicTreeNode@2e533a->BasicTreeNode@a0544 Selected: BasicTreeNode@1946c2 ... |
9. Error icon from look and feel coderanch.com |
10. Possible to set taskbar icon? coderanch.com |
11. Problems dispaying icon coderanch.com |
12. Java Icons - Where can I find them? coderanch.com |
13. Icons coderanch.com |
14. Some good Java Icons coderanch.comHi, Can anyone tell me where I might find some "java" type buttons - I'm particularly looking for one that describes a filter. (e.g. if the user presses the filter button Orders in my table are filtered to the users selection) I can't seem to find an appropriate button and am not very Arty either - any help would be much ... |
15. I need 3 Icons coderanch.com |
16. Getting rid of Java Icon on the upper left hand corner coderanch.comOk, this may sound stupid but how do you create an Image. The Image constructor doesn't seem to have any type of request for an external data input. The only way I've ever used an image was doing this: Image testImage = new IconImage("[file_name]"); but I'm not sure if that is the way you're suppose to do it. I just don't ... |
17. How can I replace the standard Java icon? coderanch.com |
18. How to get Table Header Icon? coderanch.comHi, I would like to get JTable Column Header Icon it would be nice if you could tell me a way to get it. Detail: ------- I have a table where I can able to see Up Arrow and Down arrow for ascending and descending order respectively to arrange the value in the table, now I am looking for a way ... |
19. icon coderanch.com |
20. Selection highlight problems in TreeCellRenderer using trailing icons coderanch.com |
21. Icon and JManuBar coderanch.com |
22. setting an icon coderanch.com |
23. Working with Image Icon coderanch.comimport java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.*; import java.net.*; import javax.imageio.ImageIO; import javax.swing.*; public class ImageOnImage { public static void main(String[] args) { ImageOnImagePanel imagePanel = new ImageOnImagePanel(); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(imagePanel.getUIPanel(), "North"); f.getContentPane().add(new JScrollPane(imagePanel)); f.setSize(400,400); f.setLocation(200,200); f.setVisible(true); } } class ImageOnImagePanel extends JPanel { JLabel base, top; GridBagConstraints gbc; public ImageOnImagePanel() { BufferedImage[] images = loadImages(); ... |
24. Icon image is not shown properly in LInux coderanch.com |
25. Icons 3D for free? coderanch.com |
26. How to set multiple icons in a TreeCell? coderanch.comimport java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.*; import java.net.*; import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.event.*; import javax.swing.tree.*; public class TreeTest { public TreeTest() { JTree tree = getTree(); ImageIcon icon1 = getIcon("images/middle.gif"), icon2 = getIcon("images/cat.gif"); CustomRenderer renderer = new CustomRenderer(icon1, icon2); tree.setCellRenderer(renderer); tree.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION); tree.addTreeSelectionListener(new CustomTreeSelectionListener()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(new JScrollPane(tree)); f.setSize(400,400); f.setLocation(200,200); f.setVisible(true); } private JTree ... |
27. icon related question coderanch.com |
28. notification icon question coderanch.comForgive my ignorance, but I don't use XP, so I have no idea what the "notification region" is. Suppose you got this to work - what would you want it to do on my Linux system or my friends Mac? In fact, what would you want it to do on a windows 95/98/nt/2000 machine (do those have a "notification region)? I'm ... |
29. Icons coderanch.com |
30. What's the most elegant approach when using icons ? coderanch.comHi folks, I would like to hear your opinions concerning the most elegant approach when using icons and other image types in my swing app. For instance, I would like to change the system icon of my form, so I have to store such icon somewhere in my diretory structure. I also have a JTree which according to the node type ... |
31. Swing Standard Icons ? coderanch.com |
32. JDesktop with icon coderanch.com |
33. Does Swing have icons coming for free? coderanch.comHi all, I often wondered whether Swing offers icons (like right triangle, left triangle, upward triangle, downward triangle, squares, and etc.) with their package. Can pros here offer an answer? If the answer is no, where should I be looking for icons to use in my Java applications? There should have already been a set of such standard icons, like open ... |
34. Get the standards icons coderanch.com |
35. Image icon problem coderanch.comI am currently using an image icon on a jpanel as a canvas in a basic drawing package.The icon is of a image to be drawn on by the app. Two sizes of icon are used. One larger if the user wishes to draw on the image at full scale and another if the user wishes to see the whole image ... |
36. Where do I put icons in a Netbeans 5.5.1 project? coderanch.com |
37. Problem with "New Folder" icon coderanch.comThanks for the reply. They have made a workaround for that public static void main(String args[]) { .... // A litte fix for WinXP if (System.getProperty("os.name").equals("Windows XP")) fixMyDocumentsRights(); .... } /** * Fixes the fact that you can't create a folder in My Documents with * JFileChooser unless a bit has been unset. This bit doesn't seem to affect * Windows ... |
38. Image icon issue coderanch.comimport java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.File; import java.util.ArrayList; import java.util.List; import javax.swing.*; import javax.swing.filechooser.FileFilter; public class ImageSizeCheckFrame extends JFrame { File selectedFile; ImageIcon icon; JFileChooser fileChooser; public ImageSizeCheckFrame() { initComponents(); fileChooser = new JFileChooser("."); fileChooser.setMultiSelectionEnabled(false); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.setAcceptAllFileFilterUsed(false); ImageFileFilter filter = new ImageFileFilter(); fileChooser.addChoosableFileFilter(filter); } private void initComponents() { jButton1 = new JButton("Browse"); prevImgPathLBL = new JLabel("Previous Image path:"); prevImgWidthLBL ... |
39. Create an Icon ? coderanch.comint width = 48; int height = 48; // experiment with the type for transparancy etc int type = BufferedImage.TYPE_INT_ARGB; BufferedImage image = new BufferedImage(width, height, type); Graphics2D g2d = image.createGraphics(); // do the painting on g2d, you can change this part g2d.setColor(Color.BLUE); g2d.fillRect(0, 0, width, height); // dispose the graphics object g2d.dispose(); // image is now ready |
40. finding Icons for GUI coderanch.com |
41. Adding icons coderanch.comOkay.... I went through the API's and think I found what I was looking for...... Originally I was thinking I was just going to store the UNC path to the attachments.... but then realized that maybe I actually need to store the attachment itself in a database. I've never really worked with this type of thing before.... 1st question..... how do ... |
42. How to Add a Systemtray Icon on several machines ? coderanch.com |
43. Get BasicArrowButton icon coderanch.com |
44. [HELP] setting a new icon for SingleFrameApplication coderanch.com |
45. image icon coderanch.com |
46. Creating Arrow Icon Help coderanch.comHi, Is there anyway to make an arrow Icon that looks good? I tried making one, but it doesn't look any good. Like the lines are not smooth (if you can say so), or like you can see the pixels. Is there anyway to fix this? And Yes, I do need it to be an Icon. The commented code are code ... |
47. Icons coderanch.comThanks, that worked very well... is there a way to say, I dunno, make just the pic come up if I attach it to the jLabel and have no text? If I try to remove text in design view the jLabel disappears and if I create my own label like this: JLabel label = new JLabel("", new ImageIcon("c:\\swift.gif")); It says something ... |
48. To add an icon to my project java-forums.orgDo you want a shortcut that runs your application or a shortcut that a java application makes? Also this depends what operating system you're talking about. Obviously in some operating systems there are no such things are shortcuts so this would be impossible, however in others it takes just knowing the file structure of a "shortcut" to create one in windows. ... |
49. Putting clickable icons on an image java-forums.orgHi guys, probably my problem will be so easy for you, but it is not for me. The thing is, I have to make a small application, which loads a map of a country (jpg), and paints some icons of famous places on it. And by clicking on the icons an info about that place will show in a text area. ... |
50. Icons, images, .... java-forums.org |
51. Icon initialization problem java-forums.orgHi, I am using Netbeans 5.0 to write my Java GUI app. I have a strange problem. In my java application, I have a JLabel that I'm using as an icon. Actually, I have several of these. A default icon is supposed to appear when the app starts up. When the user clicks on certain buttons (and things happen), the code ... |
52. Icon of executable . java-forums.orgHi !! I'am doing program which similar to windows explorer . I want have icon to show with executable (For example : winrar , foxit reader ... ) but no contain any icon in resource . I want use functional of OS or any another . AnyIdea!! Sorry about my english !! Thanks !! |
53. icon java-forums.orgJFrame q=new JFrame( " Game"); ImageIcon c=new ImageIcon("red.png"); ImageIcon d=new ImageIcon("blue.png"); JLabel l= new JLabel(c); JLabel j=new JLabel(d); l.setBounds(50,50,90,50); j.setBounds(100,50,90,50); q.getContentPane().add(l); q.getContentPane().add(j); q.setVisible(true); i just place in main it is executing correctly but i just want to get "red.png" (x,y,width,height) does there is any method AND also i just want to generate these icons in random order but how there are ... |
54. [SOLVED] [newbie] java.lang.String cannot be cast to javax.swing.Icon java-forums.orgAny idea what the problem is here? :confused: Java Code: [B]ToolBarFrame.java[/B] package homenetwork.bkr.training; import javax.swing.*; import java.awt.*; import java.awt.event.*; @SuppressWarnings("serial") public class ToolBarFrame extends JFrame { public ToolBarFrame() { setTitle("Toolbar test"); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); //add a panel for color change panel = new JPanel(); add(panel, BorderLayout.CENTER); //set up actions [B]Action blueAction = new ColorAction("Blue", new ImageIcon("C:\\icons\\blue-ball.png"), Color.BLUE); Action yellowAction = new ColorAction("Yellow", ... |
55. GUI image icon - help. forums.oracle.comI am working on a card game and depending on which object is currently being utilized, I need to take that picture to place it in an icon. So, if the card I am using is a 2 of clubs I would like to display the card's image in a gui window. My question is, is there a way of doing ... |
56. GUI image icon - help. forums.oracle.comEDIT: I made a mistake. The class in my text book was named something else. This was a previous class of mine and I forgot to change the title. I apologize for the confusion! I do have a question: when I fixed the problem, the image would be resized whenever I resized the window. So, only a portion of the large ... |