• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Code Not Working!!! Can you please say y this code is not working?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package chess;
import java.awt.*;
import javax.swing.*;

public class Chess {
public static void main(String[] args)
{
board obj=new board();



}
}
class board extends JPanel
{
JFrame fr = new JFrame("CHESS");
JPanel pan=new JPanel();
Container con=new Container();

@Override
public void paintComponent (Graphics g)
{
System.out.println("HI");
/*fr.setSize(800, 800);
fr.add(con);
g.drawRect(10, 10, 100, 100);
*/
/* int x=0,y=0;
fr.setSize(800, 800);
fr.add(con);
for(int i=0;i<4;i++)
{
for(int j=0;j<4;j++)
{
x=i*100;
y=j*100;
g.fillRect(x, y , 100 , 100);
}
}
fr.add(con);
fr.setVisible(true);*/
System.out.println("PRATIK... Happy ? ");
}
void draw()
{
fr.add(pan);
pan.add(con);

}
}
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can say that this code has absolutely nothing whatsoever to do with JavaServer Faces.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I can say ItDoesntWorkIsUseless
 
reply
    Bookmark Topic Watch Topic
  • New Topic