or you can put the style tag in your buttons like

style="width:100px"

<input style="width=100%" type="button" name=<%=show%>  value="<%=show%>"
style="width:100px">

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


-----Original Message-----
From: Vaishali S. Pandya [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 11:49 PM
To: [EMAIL PROTECTED]
Subject: Re: Why my button have different size in JSP?


hi edward
u can do one thing
just put all the buttons in table
it will show same size
try the code i have changed

Vaishali
Relience Ind Ltd
Ahmedabad


<%@page import="java.io.*"%>
<html>
<title>User Menu</title>
<table width="50%">
<body>
 <%
   String message[];
   int length;
   int location;
   message=(String[])request.getAttribute("jsp");
   for(int j=0;j<message.length;j++)
   {
    String show=new String("
********************************************************");
    length=show.length();
    //I want to move message into the center of show
    location=(length-message[j].length())/2;
    if(location%2==0)
    {
     show=show.substring(0,location)+message[j]
          +show.substring(length-location+1,length);
         }
         else
         {
          show=show.substring(0,location)+message[j]
          +show.substring(length-location,length);
         }
  %>
            <tr>
            <td>
            <input style="width=100%" type="button" name=<%=show%>  value="
<%=show%>" >
            </td>
            </tr>
<%
   }
  %>
</table>
</body>
</html>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to