Image component 1 « Icon Image « Java Swing Q&A





1. Is this possible to do with images in java?    stackoverflow.com

Is there any way I can print/show images on top of each other. The picture on top will always be positioned a little lower so that the one under will show ...

2. how can I add movable images to my GUI?    stackoverflow.com

I want to add an image which can move like when you sign in,you will see an image of yahoo messenger that moves suddenly. thanks ** I also work with NetBeans**

3. What does this "Image Fetcher 0" is doing?    stackoverflow.com

While debuging a swing application I saw this thread appears quite offen. There is a another thred call "Image Fetcher 1" also. can someone please explaint to me what does this thread ...

4. java UnsatisfiedLinkError awt.image    stackoverflow.com

I have a program that makes use of the following method to get a scaled instance of an image icon:

public ImageIcon createScaledImageIcon(String filename) {
    ImageIcon icon = new ...

5. Java swing app can't find image    stackoverflow.com

I'm making a torpedo game for school in java with swing gui, please see the zipped source HERE. I use custom button icons and mouse cursors of images stored in ...

6. How to Stich to Image objects in Java    stackoverflow.com

I have a scenario in which i`m getting a number of tiles (e.g.12) from my mapping server. Now for buffering and offline functions I need to join them all back again ...

7. How to Stich multiple java.awt.Image objects    stackoverflow.com

Refereing to my previous question, http://stackoverflow.com/questions/2682364/how-to-stich-to-image-objects-in-java I successfully stiched two java.awt.Image objects, now I need to stich multiple objects of the same type. Is there any API or library available for that ...

8. Tiled images in swing    stackoverflow.com

I have task to prepare two windows with swing. One contains grid of squares, with random numbers in them. In second I need to load pieces of tiled image and then ...

9. Adding Image to a Polygon    stackoverflow.com

I have been looking around to for help with this and no luck so I thought I would ask. I am creating a series of diamond polygons and want to add an ...





10. Create VolatileImage always return null    stackoverflow.com

I am creating a volatile image in the following class, but hitting a NullPointerException every time. The reason why createVolatileImage() is returning null (from its JavaDoc) is that GraphicsEnvironment.isHeadless() is true.

import ...

11. How do I set Z-order for image in Swing Java    stackoverflow.com

I have 3 image so I want, if I drag any image that should appear above all the other images. Which technique can use? please any idea???? By the way I ...

12. Shape properties from an Image in Swing    stackoverflow.com

I have an Image and I'm able to draw a rectangle on the image like this:

Rectangle rect = new Rectangle(x,y,width,height);
graphics2D.draw(rect);
Then I rotate the Image and the drawn rectangle also rotates as ...

13. Images Not Showing in Java App    stackoverflow.com

can someone please point me in the right direction? I'm trying to get my graph images to show up based on what button is clicked, but nothing is showing. I'm not ...

14. The image cannot update other components (MVC)    stackoverflow.com

import java.awt.event.ActionListener;
import java.util.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.ActionEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.AdjustmentEvent;
I have several other frames (two are just punching numbers in, and another is also a scrollbar). I can use other components to ...

15. GUI in Java using Swing    stackoverflow.com

I really need some guidance on how to create a GUI in Java. I'm a student in college and it's one of the the thing they never focus on. I currently ...

16. error adding image object    stackoverflow.com

The following code produces error:

ImageIcon i=new ImageIcon("logo.png");
Image scaleImage=i.getImage().getScaledInstance(10,10,Image.SCALE_DEFAULT);
mainPanel.add(scaleImage);
The error is cannot find method add(Image). Why it is giving this error?





17. Image Rollover not working    stackoverflow.com

Can anyone help me with the code please. I have two images 1.jpg and 2.jpg, when i run the program ,1.jpg appears on button, but when i hover the mouse on ...

18. HotSpot for image in java swing    stackoverflow.com

I am working on to create a hotspot for image in swing. Can anyone give idea for this. Thank in advance..

19. Show Image While Designing    stackoverflow.com

I created a component to display Image in jPanel.But its not showing the image during design time.how to show Image on design time?

public class JImagePanel extends JPanel {
private BufferedImage _img=null;

public JImagePanel() ...

20. Let an image fly in a circle in Java    stackoverflow.com

I need to let an image fly in a cirle, i'm now only stuck on one part. For calculating the points it needs to go im using pythagoras to calculate the height ...

21. How can I make my image bounce along the x-axis?    stackoverflow.com

I have an image which moves horizontally with a given speed over a delta time(dt). But the problem is,the image doesn't bounces off when it reaches the end of the size ...

22. Dynamically Create Image of Java Component    stackoverflow.com

I'm currently working on a project for school and am very lost. I am trying to create an area which can be painted on by the user (I'm somewhat done with ...

23. Adding images to swing using netbeans but not gui builder.    forums.netbeans.org

I am a hobby programmer, however I am stuck in this java application of mine which has to put image from a directory. I have made a new package called finalconnect5.resources ...

24. [GUI]Images    forums.netbeans.org

I am trying to make a button, but I want the button to have a image with it... is this possible? Also, how do I even add images... Thank you... Zach

25. how do i magnify in on an image    coderanch.com

26. image    coderanch.com

27. IMAGES    coderanch.com

28. Images    coderanch.com

29. Image trasfer using AWT/Swing    coderanch.com

30. repeat image    coderanch.com

31. Serialisation of Image in Swings    coderanch.com

32. Serialisation of Image in Swings    coderanch.com

34. Images not being picked up from the server    coderanch.com

Hi, I have made an application which picks up images from the server and displays, i have made an array for url and intialize it once. It is working fine but the problem is that the images i think are being picked up from the local machine and not picking it up from the server everytime it displays it, i want ...

35. Image Serialisation    coderanch.com

36. Swings + Image    coderanch.com

37. Images(URGENT!!!!)    coderanch.com

38. Images in Swing    coderanch.com

Well, the easiest thing to do would be to make images of the numerals 0 - 9 that look like what you want. Then just do some parsing of the number that you want to display to display the appropriate graphics. Make sure that all the numeral graphics are the same size. Then, load them up as ImageIcons in your program... ...

39. bufferd Image!    coderanch.com

40. Image problem, urgent!!!    coderanch.com

41. Images as Components?    coderanch.com

42. Help Needed Urgently!!! -- Showing image    coderanch.com

Hi Nathan, Thanks for your response. For my project, I do need to read and proccess the image. I do have the right to use the image. My problem is I need do these jobs online. So, have any solution to solve it? By the way, anybody has experience to signe an Applet? I mean allowing a server other than the ...

43. Image    coderanch.com

Yes... using AWT makes a difference... No ImageIcon class in AWT... To display an Image in a frame you either have to override the paint() method of the Frame and draw your image there, or use another component ( like an extended Panel or Canvas ) to draw your image on, and then add that component to the Frame. I prefer ...

44. Interesting Image problem    coderanch.com

I only had to modify one of my programs a little bit to get it to do this... If you need any further explanations, please post... import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.filechooser.*; import java.io.File; import java.util.HashMap; import java.awt.image.PixelGrabber; public class ColorCounter extends JFrame { private JButton imagePanel; private JTextField numText; public ColorCounter() { super( "Color Counter" ); imagePanel = ...

45. Image problem    coderanch.com

Hi friends, I'm having one serious problem while dealing images. I 'm in need to find the size of the image occupied in memory. How to find that. Also, how to find the properties of the image which should provide number of colors for that image ? That is, by using pixel grabber class, we can get the individual pixel and ...

46. How to add images    coderanch.com

47. image    coderanch.com

48. images with swing    coderanch.com

49. How to send image over a network    coderanch.com

Depending on what you want to do with the image you could convert the BufferedImage into some other format. In jdk1.2 and 1.3 there is a package called com.sun.image.codec.jpeg that can encode your BufferedImage into a JPEG. This image can be sent via RMI. On the other end, you can use this image as is or use the JPEGImageDecoder class to ...

50. how to use image ?    coderanch.com

i want to implement a graphic image which would be contained inside a frame or panel, may be like a canvas. how to use an image as a canvas like a background upon which i want to place other components ? also what should be the format of the image ? jpg is ok ?

51. Image filter & AWT    coderanch.com

52. Image Question    coderanch.com

Originally posted by Kevin Wright: Hi - Is it possible to place one image on top of another? My situation is this: I have a background image that will have one of three different indicators (also static images) rotated depending on data once a week. This is difficult in HTML, I am trying it out in java. Thanks, Kevin

53. how to blur an image?    coderanch.com

54. Help need at Image Control    coderanch.com

I has a project to control images: 1. Need print the image to printer 2. Need has ways to rotate the images: 90, 180, and 270 degrees 3. Need has ways to change the images size. Where can I find such kind of APIs or Packages? Or where can I find some/any sample codes? Thanks a lot!

55. How to use the Hand cursor on an Image !!!!    coderanch.com

Hi, I have a main Jframe which contains a Jpanel which contains a jscrollpane. THe image is in scrollpane and i would like to use the Hand cursor to move the image up and down the jscrollpane. Can someone tell me or show me how can i use a hand cursor on an image I would appreciate if someone can show ...

56. Component on Image    coderanch.com

import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TestJFrame extends JFrame { public TestJFrame(){ super("Test Frame"); this.getContentPane().setLayout(null); JButton b = new JButton("Button"); b.setBounds(5, 5, 100, 20); this.getContentPane().add(b); } public static void main(String[] args){ TestJFrame tjf = new TestJFrame(); tjf.setSize(400,400); tjf.setVisible(true); } public void paint(Graphics g) { Image i = Toolkit.getDefaultToolkit().getImage("logo.gif"); g.drawImage(i, 0, 0, this); } }

57. How can I merge 18 images to 1 images?    coderanch.com

bigsoon, You need to describe what you are trying to do in more detail. OK, you have 18 images and you want to create 1 image from them. In your second post you mention that you want to make them into layers... so I am assuming that each image has transparency in it and you are going to lay each of ...

58. where to contain image    coderanch.com

I want to keep the image reference in a variable What will be the type of variable where i can keep the IMAGE like "abc.gif" or "xyz.jpg" for eg if want to keep the color i use Color changingColor= Color.light; but how i can keep the image as i want to make the program which keep on changing images on click ...

59. Extending Image    coderanch.com

60. image water mark    coderanch.com

61. OutOfMemoryError for Images    coderanch.com

62. creating Image    coderanch.com

public class Something ... { private BufferedImage image; public Something() { . . . int width = 100; int height = 100; int type = BufferedImage.TYPE_INT_RGB; image = new BufferedImage( width, height, type ); Graphics g = image.getGraphics(); g.setColor( Color.red ); // Do drawing on image here... . . . } public void paint( Graphics g ) { g.drawImage( image, 0, ...

63. Image support    coderanch.com

65. Images on top of each other    coderanch.com

Hi all! I have a question of how I place several images on top of each other. I have an application and I place a background image in it. Then I want to have images "on top" of the background imgage. All images is in the format .png, which can be transparent. My problem is that when I add an transparent ...

66. AWT Image    coderanch.com

67. accelerating the flicker of an image    coderanch.com

68. Question regarding working on images using Java    coderanch.com

Hi all , I have to develop a program which loads an image to Jpanel, and then draws a line using two points.After that when a user click on the image it should be able to zoon in/out. I am new to java Swing and graphics stuff , i am planning to learn and do this , I really need some ...

69. image properties    coderanch.com

Hi all, I am working on a web site that allows a user to upload images. When I receive them I want to read the images properties especially the date of when the image was taken. Can anyone help me with this as i have been searching the net for a while and I cant find anything on it. Thank you ...

70. Image Comparison    coderanch.com

Filenames aren't associated with Image objects in Java... Images can be built completely in memory without ever touching a file. You can get height and width, but you can scale an image, and so this won't be accurate either. The most accurate solution (but personally I think this is overkill... visual comparison would be so much simpler, unless you have to ...

71. Page Orientation Problem with Image getting cut off    coderanch.com

Hi, I am currently drawing a jpeg to an 8.5 x 11 page. Problem is that the right hand size of the image doesn't appear(I beleive its due to page borders). To solve this, I tried setting the page orientation to Landscape before drawing. Page is landscape, but even know there is plenty of room, the same part of the image ...

72. calling .TIF image in Swing    coderanch.com

73. Image problem in SWING    coderanch.com

Hello friends , I am a learner in SWING .. i have a problem which i would hope that atleast someone wud have the solution for it .. "I am using a GRIDBAGLAYOUT and adding buttons and labels to a panel ..Its working fine but now i also wanna add an IMAGE to the panel .. how can i do that ...

74. Appending two images to one    coderanch.com

I need to append two different images and make it one image. Basically I have TIFF image one page1 and page2. I am using JAI to read two pages and convert them as two different images. Now I need to append those two images one below another and make as one single image. The format of image can TIFF/JPEG/PNG. Hope This ...

75. image distoration    coderanch.com

Are you scaling from your new image each time? You lose a little information each time you scale, so after a few iterations, that would cause visible distortion. The fix, if that's the problem, would be to scale from the original image each time, keeping track of the cumulative scaling factor. Warren

76. image transperancy    coderanch.com

You need to provide more information about what you are doing and exactly what you are trying to accomplish... Are you using AWT or Swing? Are you trying to make the image background transparent in relation to other components inside your application, or are you trying to make the entire application transparent all the way to the desktop?

77. Learning about various image technologies    coderanch.com

Hi- I just wanted to know if anyone could point me to a good learning page that would show me various tutorials/faqs regarding such things as image rendering geometry, anti-aliasing, file type technical descriptions, etc... etc... I am taking over some code from a former employee, and I really need to get informed the basics, as I've been server side for ...

78. Sending Image    coderanch.com

HI I am capturing screen shot and sending it to different system in some interval. is it possible to avoid bandwidth usage we send only data which is changed for example I capture the image of my desktop and next time only cursor of my mouse is displace from its original position so I send only the new position of mouse ...

79. Stamping an Image    coderanch.com

Don't stop reading, just because I'm going to say something about a paint program!!! ;D I'm trying to figure out how to make a 'stamp' for a paint program. I want the user to click on a small icon, say a picture of a tree. Where ever the mouse is moved in the drawing area, the tree stamp will follow. When ...

81. Supported Image Types    coderanch.com

82. Supported Images    coderanch.com

83. Images    coderanch.com

84. Images    coderanch.com

85. adding images to components    coderanch.com

Hi all, i need to add an image to a panel but it is important it does not stretch or shrink to fit the panel as i will require the exact dimensions of the image to apply some image processing features to my GUI. How do I add the image as is?

86. Create Image object    coderanch.com

87. Creating Images    coderanch.com

Hi! I have a jar file which contains some images. I have some texts and image names (which are present in jar file) and there coordinates. Can I create a image file that contains text and images (from jar file) at specific coordinates ( I mean by extracting specific images from the jar file ).

88. topic is on images    coderanch.com

Hi everyone, I Am Doing a small application on images. I have Created menubar with menus in a frame, and I am displaying a image using Toolkit and MediaTracker using drawImage function. Now how can i perform ZoomIn ZoomOut operations like to reduce and increase the height and width of the image. I am passing only 4 parameters to drawImage Function, ...

89. Image ByteStream    coderanch.com

Hi all, Sorry, dont know where to post this...I have a black and white png image. I was wanting to load the file, and then convert every pixel to binary (ie o for black and 1 for white) then put them into a 2D array, or file. Example... A picture of chess board section into 110011001100 110011001100 001100110011 001100110011 I tried ...

90. java2d supports vector images    coderanch.com

91. Images    coderanch.com

import java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.text.*; public class ExportTest { public ExportTest() { JTextPane textPane = new JTextPane(); StyledDocument doc = textPane.getStyledDocument(); initStyles(doc); initDoc(doc); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(getUIPanel(textPane), "North"); f.getContentPane().add(new JScrollPane(textPane)); f.setSize(400,400); f.setLocation(200,200); f.setVisible(true); } /** * copied from TextSamplerDemo in java tutorial */ private void initStyles(StyledDocument doc) { Style ...

92. Combining two separate Images    coderanch.com

93. Image Distortion and Skeletonization in Java    coderanch.com

Hello guys. I badly need help! Does anyone know of any image distortion techniques and its implementation in java? Help me please please pretty please! I and some blockmates are doing a project in image processing and we're lacking in at least four image distortion techniques and also implementation of the morphing technique called skeletonization. For the distortion, we plan to ...

94. Mask on Image    coderanch.com

Hello, Ca please help me with this, i am stuck up with a problem. It would be kindful if any of u could help me out with this. I have an applet on which a BufferedImage is displayed, I want a part of the image to be blocked ( i.e where ever i click) so that i can modify that part ...

95. Magnifying only a part of the image    coderanch.com

import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import java.awt.image.*; import java.io.*; import java.net.*; import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.event.*; public class MagnifierTest { MagnifierPanel magnifierPanel; MagnifierControl control; public MagnifierTest() { magnifierPanel = new MagnifierPanel(); control = new MagnifierControl(magnifierPanel); magnifierPanel.addMouseListener(control); magnifierPanel.addMouseMotionListener(control); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(new JScrollPane(magnifierPanel)); f.getContentPane().add(getUIPanel(), "South"); f.setSize(400,400); f.setLocation(200,200); f.setVisible(true); } private JPanel getUIPanel() { final JLabel label = ...

96. Encoding a Java image    coderanch.com

I'm not sure if this is the correct forum for this, but I figured I would give it a shot. If I have a fixed panel of 250 x 70 pixels, and the User is allowed to scribble all over it...what do people think is the most efficient way to store what was drawn to be sent over some network connection? ...

97. Image Warping    coderanch.com

98. Image and Image not the same....    coderanch.com

99. Java Image "snapshot" question    coderanch.com

100. NullPointer in Image    coderanch.com