*/ import java.applet.*; import java.awt.*; public class MyApplet8 extends Ap" name="description">

its the coding of create layout of chess in applet

/* <Applet code="MyApplet8" width="480" height="480">
    </Applet>
*/

import java.applet.*;
import java.awt.*;

public class MyApplet8 extends Applet
{

    public void paint(Graphics g)
    {
        int w=getWidth();
        int h=getHeight();
        int y=0;
        for(int j=1;j<=4;j++)
        {


        for(int i=0;i<=w;i=i+w/8)
        {



            g.setColor(Color.BLACK);
            g.fillRect(i,y,w/8,h/8);
            i=i+w/8;
            g.setColor(Color.WHITE);
            g.fillRect(i,y,w/8,h/8);

        }
            y=y+h/8;
        for( int i=0;i<=w;i=i+w/8)
        {
            g.setColor(Color.WHITE);
            g.fillRect(i,y,w/8,h/8);
            i=i+w/8;
            g.setColor(Color.BLACK);
            g.fillRect(i,y,w/8,h/8);
        }
            y=y+h/8;
    }

     }
}
View Answers









Related Tutorials/Questions & Answers:
hi its the coding of create layout of chess in applet i hope u like it
its the coding of create layout of chess in applet  /* <Applet code="MyApplet8" width="480" height="480"> </Applet> */ import java.applet.*; import java.awt.*; public class MyApplet8 extends Applet
Two user chess game - Applet
Two user chess game  Write a program for a two user chess game(Users must be on different systems)? please send me this source code to my mail id with step by step explanation
Advertisements
need help to create applet
... ~Create an Applet using all Layout Manager(use whatever component in each layout) a) FlowLayout b) BorderLayout c) GridLayout d) GridbagLayout...need help to create applet  Can u help me..?? I get a task ...and i
Need to create a java applet
Need to create a java applet   Hi people i need to create a java applet for which there will be 2 buttons to indicate small and big. I need to make a circle. When i click small the circle should be small and when i click big
How to create Applet Hello World?
How to create Applet Hello World?  Hi, What is Applet in Java? How to create Applet Hello World? Thanks   Hi, Applet is Java Program... to create applet class in Java and then compile it into class file. After
how i want to create a coding by this question?
how i want to create a coding by this question?  Design and write a class named Person and its two subclasses named Student and Employee. Make Lecturer and Admin subclasses of Employee. A person has a name, address, phone number
Create SpreadSheet same as excel using java applet
Create SpreadSheet same as excel using java applet  Hi Ji, May i know to create new excel sheet using java Applet
Create SpreadSheet same as excel using java applet
Create SpreadSheet same as excel using java applet  Hi Ji, May i know to create new excel sheet using java Applet
Problem In applet Its run on browser but hang and blinking when image is draging some where.
Problem In applet Its run on browser but hang and blinking when image is draging some where.  I am Created applet in working properly on browser. In my applet 52 card images is draw and drage and move on the applet, but when I am
Create Layout Components in a Grid in Java
Create Layout Components in a Grid in Java       In this section, you will learn how to create layout components with the help of grid in Java Swing. The grid layout provides
Applet
Applet  Write an applet to display a string in an applet. String should be passed as a parameter to an applet
What is Applet in Java with Example?
that runs on the Java enabled web browser. Applet allows the developer to create GUI... Enabled web browser. Applet can be used to create various types of applications... standard.ADS_TO_REPLACE_1 Introduction Applet is Java program and its jar files
Chess Application In Java Swing
; In this section, you will learn how to create chess game in java swing... .style1 { margin-right: 0px; } Chess Application... actions. This chess simulator will help you to master your chess playing
applet
applet  What is the immediate superclass of the Applet class
Applet
Applet  how to run an applet on a web browser
applet
applet  Explain different stages in the lifecycle of an applet with figure.   Stages of Applet: Life cycle of an Applet: init(): This method is called to initialized an applet start(): This method is called after
Applet
Applet  Give the class hierarchy of an Applet class
Applet
Applet  Write a ava applet that sets blue color foreground and yellow color background at the start of an applet
Applet
Applet  Explain the start() and stop() methods of applet life cycle.   Start and Start method of Applet Life Cycle Start () method: The start method of an applet is called after the initialization method init
Applet
Applet  Write a short note on applet life cycle
Applet
Applet  I have a java applet that has a button. On clicking the button it should disappear and another applet should appear. How to write this code???? Also in login applet after successful login it should display admin applet
Chess Game
Chess Game  How could I make a basic 8x8 chess table with two dimensional arrays and insert the chess pieces in the array?   Please visit the following link: http://roseindia.net/java/example/java/swing/chess
applet - Applet
.  Hi Friend, Try the following code: 1)Create an applet... extends Applet{ public void paint(Graphics g){ g.drawString("Welcome in Java Applet.",40,20); } } 2) Call this applet with html code
coding
coding  I need the logout coding. can you please help me.   Please visit the following links: http://www.roseindia.net/quickguide/tomcat/Logout.shtml http://www.roseindia.net/jsp/loginstatus.shtml
Applet
Applet  Draw the class hierarchy of an Applet class. Also explain how to set background and forground colors in java
program to create student report using java applet,read the input using text boxesand generate the grades..?
program to create student report using java applet,read the input using text boxesand generate the grades..?   sir plz give me java applet codes for above question
applet
applet  what is applet in java   An applet is a small program that can be sent along with a Web page to a user. Java applets can perform... the following link: Applet Tutorials
What is an Applet
What is an Applet - Java Applet Tutorial       Introduction Applet is java program that can... such as mozila and internet explorer. Applet is designed to run remotely on the client
Applet
Applet  Write a Java applet that drwas a line between 2 points. The co-ordinates of 2 points should be passed as parametrs from html file. The color of the line should be red
Creating an Applet
, first of all you should know about what is applet and then you should focus on how to create an Applet using all Layout Manager. Below links can brief you about all... an Applet using all Layout Manager, can anyone help me in this regard. I donā??t know
Create cube shape in Applet
Create cube shape in Applet In this tutorial, you will learn how to create...) { a = A; b = B; } } public class DrawCube3D extends Applet implements MouseListener...) { } } applet.html:ADS_TO_REPLACE_1 <applet code=DrawCube3D.class width=500 height=400
applet
applet  applet to open new tab not working.here's my code import java.applet.*; import java.awt.*; import java.net.*; import java.awt.event.*; public class NewURL extends Applet implements ActionListener{ public void init
coding
coding  write a program to create a file using thread1 and read the file using thread2 and display in the console
coding
coding  write a program to create file using thread 1 and read the same file using thread2 and disply
coding
coding  Create table - Emp containing empId String (20), empName String (50), DOB Date, deptId String(20). Primary key is empId. Foreign Key is deptId. Populate some records
coding
coding  Write a java program to Create table - Employee containing empId String (20), empName String (50), DOB Date, deptId String(20). Primary key is empId. Foreign Key is deptId. Populate some records
applet problem - Applet
applet problem  How can I create a file in client side by a java applet . Surely it will need a signed applet .But how can a signed applet create a file in the client side
coding shape
coding shape  i need to write a simple java program. the system must be in an applet and allows a user to choose whether to draw shapes... a color and its radius and locate where to draw it by clicking a mouse on color
ModuleNotFoundError: No module named 'chess'
ModuleNotFoundError: No module named 'chess'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'chess' How to remove the ModuleNotFoundError: No module named 'chess'
Applet - Applet
Applet  what is the concept of applet? what is different between the applet concept and HTML? what is mean by swing?  Hi friend, Applet Applet is java program that can be embedded into HTML pages. Java applets
The Java Applet Viewer
; the browser should be Java enabled.To create an applet, we need to define.... Its not always mandatory to open a Web browser for running an applet... viewer and web browser to confirm its working.ADS_TO_REPLACE_1 The applet
applet is running but no display
applet is running but no display  applet is running but no display.. its showing white screen with applet started
Version of com.marcelotomazini>chess dependency
List of Version of com.marcelotomazini>chess dependency
add a new wcf service code to TFS and make it available to create an MSI. of its
that the setup folder recognizes it to create its setup file(.msi...add a new wcf service code to TFS and make it available to create an MSI. of its  i need to add a new wcf service in the existing TFS and create
Applet - Applet
Applet   Namaste, I want to create a Menu, the menu name is "Display... java.awt.event.*; public class menu2frame extends Applet implements WindowListener...------------------------"); g.drawString("Demo of Java Applet Window Event Program"); g.drawString("Java
applet - Applet
*; import java.awt.*; public class CreateTextBox extends Applet implements.../applet/ Thanks
Applet database access - Applet
Applet database access  HI... I'm having an applet where we should display the database values in the applet... It works fine in the local system... but when its in the server, we r getting null values in the local system.. I
Applet query - Applet
Applet query  i want to knw d complete detail of why does applet not contain a main method.  Hi Friend, Applets do not start its own... calls the applet methods at different points depending on the stage it reached
Please help me to create this coding for pizza order application using a handheld computer.....
Please help me to create this coding for pizza order application using a handheld computer.....  You work as a programmer for IT-Tech a small software house which specialises in writing software for restaurants and hotels
Animation in Java Applet
Applet is a java class that runs inside the internet browser. It uses Thread along with its methods for animation. Applet class implements the Runnable...; import java.util.Random; //<applet code="rect1" width="300