Graphics2D & JTextField Problem

I'm trying to add a JTextField to a JPanel which paints a bunch of lines and what not using Grahpics2D but the JTextField doesn't show up. Is there anything I'm missing in terms of functionality?

The way I was adding it was in the constructor for the class that extends JPanel.

Cheers

PS I didn't post the code because I do not have it on me at the second and don't think it's a code problem.

Thanks

[437 byte] By [kerryblue19a] at [2007-11-27 11:58:02]
# 1

> I didn't post the code because I do not have it on me at the second and don't think it's a code problem

Then what kind of problem do you think it is?

Does your code work if you add a text field to a panel that doesn't have custom painting?

camickra at 2007-7-29 19:17:21 > top of Java-index,Desktop,Core GUI APIs...
# 2

I am unsure of what else is on your Jpanel, or how Graphics2D works (its been a while).

But, did you add the JTextField and then added the custom Graphics over it...because it should probably be the other way around.

Flavouskia at 2007-7-29 19:17:21 > top of Java-index,Desktop,Core GUI APIs...
# 3

Do you by any chance override paint() instead of paintComponent() in your custom containter?

kirillga at 2007-7-29 19:17:21 > top of Java-index,Desktop,Core GUI APIs...