Set the CSS style attribute of the input to "background: none;" as in this example
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Transparent Input</title>
<style type="text/css">
div {
background: url(http://www.codingforums.com/img/logo.gif) no-repeat;
width: 315px;
height: 64px;
}
form input {
margin-top: 40px;
background: none; /* this is the important bit */
}
</style>
</head>
<body>
<form name="frm" method="post" action="#">
<div>
<input type="text" name="txt" id="txt" />
</div>
</form>
</body>
</html>
Hope this helps.
m_n
__________________
"Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
-Tommy Cooper
This is a Javascript forum mate, not a Java forum - they are two different languages. You'd be better posting there to get an answer to your question.
m_n
__________________
"Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
-Tommy Cooper
Also clarify what kind of textbox. AWT, Swing, etc.
__________________
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/