View Full Version : java help

12-14-2006, 02:43 AM
i need to find a way to make the background of a text box transparent in Java, like so my background image shows through, not a white box

12-14-2006, 12:15 PM
Set the CSS style attribute of the input to "background: none;" as in this example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<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 */

<form name="frm" method="post" action="#">
<input type="text" name="txt" id="txt" />
</html>Hope this helps.


12-14-2006, 12:19 PM
yeah i meant im writing a program in java and need to make a transperant text box

12-14-2006, 01:14 PM
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.


12-14-2006, 02:06 PM
Also clarify what kind of textbox. AWT, Swing, etc.