Since 1998, Alden Hosting is a provider of business-class Web hosting to small- and medium-sized businesses, providing professional, efficient, and reliable services. We provide everything you need to get your business on the Internet. We make it easy and affordable. Alden Hosting's feature-rich hosting plans and excellent 7 days a week toll-free customer support empower you to efficiently build a Web business that will grow with your changing needs.
create develop siteweb *; public class Mondrian2 extends Applet { int height, width; public void init() { Dimension d = size(); height = d.height; width = d.width; repaint(); } public void paint(Graphics g) { g.drawRect(0, 0, width-1, height-1); }}As usual compile this and load it into your browser. If the problem isn't fixed check to make sure that you moved the new class file into the classes directory and that you modified the HTML file to point to Mondrian2.
create develop siteweb We've introduced exactly one new statement in all this code, drawRect which is a method in the Graphics class. The line g.drawRect(0, 0, height-1, width-1) instructs the Graphics class g to draw a rectangle beginning at the point (0, 0) and ending at the point (299, 299). This particular rectangles encompasses the entire applet's visible space. There is nothing to keep us from drawing outside the applet, in fact we did exactly that in our first version where we actually extended the rectangle to (300, 300); but anything we draw there won't be seen by the user.
create develop siteweb The drawRect method draws an open rectangle. If we want to draw a filled rectangle we use the fillRect method. Otherwise the syntax is identical. In Mondrian3 we'll draw a filled rectangle in the center of the applet. Here's the code://Draw a rectangleimport java.
create develop siteweb
Web Hosting Links Portal
Web Hosting
JSP Hosting
Tomcat Hosting
MySQL Hosting
servlets Hosting
Web Site Hosting
JSP Hosting
Tomcat Hosting
MySQL Hosting
servlets Hosting
JSP Web Hosting
JSP Web Hosting
Servlet Web Hosting
Servlet Web Hosting
Alden Trading
Alden Shoes
ebootery
Minnetonka Moccasins
myMoccasins
Protecting Your Assets Portal
Offshorelaw links
Offshorelaw
INTERNET LARGEST NEW CAR BUYING SERVICE
Where You will Find every wedding service you will need
Where You will Find every wedding service you will need
unemployment benefit services
unemployment benefit services
unemployment benefit services
Menu Paper
Menu Paper
Dancing Waters
Dancing Waters
create develop siteweb