Tag: swing

JTextField with image inside it

The final output will look like following: I applied same logic as one will do with css if it was meant for website. Just 2 simple steps: Draw the image as background in text box. Set margin of image width for text inside text box. For the first step one have to override painComponent method … Continue reading JTextField with image inside it


Infinite progress bars in swing

Following are some infinite progress bars built in java swing 2d using JPanel's paintComponent(Graphics g) method. Windows XP I have seen this kind of loading icon while setting up windows XP, you might have also seen it: So how one can simulate same in swing? Here is the answer: Circular infinite progress bar For this you … Continue reading Infinite progress bars in swing