Hi,I'm a beginner to Java. Can anyone help me? I want to know how a textField to be displayed above a image(like acting as the background of that textField).
sky_B
0
Newbie Poster
Recommended Answers
Jump to PostYou can use a small panel that displays an image as a container for your controls. Something like this
class ImagePanel extends JPanel { Image img; public ImagePanel(){ super(); img = loadImage("whatever.file"); } public void paintComponent(Graphics g) { super.paintComponent(g); if(img != null) { g.drawImage(img, 0, 0, this); …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.