Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Pritam N Bohra

@Pritam N Bohra
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CardLayout in AWT
    P Pritam N Bohra

    I've trying CardLayout prog. but the program is not displaying the buttons at all. I tried a lot but could not find out the error. If you could look into this code and tell me where I am going wrong I would be grateful to you. The code is as follows: import java.awt.*; import java.awt.event.*; class CardLayoutTry implements ActionListener { Frame frm; Button window,linux; Checkbox chkWin7,chkWin8,chkWinXP,chkWinVis; Checkbox chkUbuntu,chkMint,chkFedora,chkRedHat; Panel deck, panWin,panLin; CardLayout cardLO; Label lblWin,lblLin; CardLayoutTry() { cardLO=new CardLayout(); frm=new Frame("Operating System"); frm.addWindowListener(new WindowAdapter(){ @Override public void windowClosing(WindowEvent we) { frm.setVisible(false); System.exit(0); }}); frm.setVisible(true); frm.setSize(300,300); deck=new Panel(); // main panel deck.setLayout(cardLO); // setting the layout panWin=new Panel(); panLin=new Panel(); window=new Button("Windows"); frm.add(window); window.addActionListener(this); linux=new Button("Linux"); frm.add(linux); linux.addActionListener(this); // ADDING LINUX DETAILS lblLin=new Label("LINUX OPERATING SYSTEM",Label.CENTER); panLin.add(lblLin); chkUbuntu=new Checkbox("Ubuntu",true,null); chkMint=new Checkbox("Mint"); chkFedora=new Checkbox("Fedora"); chkRedHat=new Checkbox("Red Hat"); panLin.add(chkUbuntu); panLin.add(chkMint); panLin.add(chkFedora); panLin.add(chkRedHat); deck.add(panLin,"LinuxPanel"); // ADDING WINDOWS DETAILS lblLin=new Label("WINDOWS OPERATING SYSTEM",Label.CENTER); panLin.add(lblLin); chkWin8=new Checkbox("Windows 8",true,null); chkWin7=new Chec

    Java linux java help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups