• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Swing Applet

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy all.....yeeeehaaaa
I need a hand with a swing applet I can do awt. But how do I make the content pane.ect or do I even need it...N e way all I need is the bare bones of a Swing applet to help get me started..N e help would Be dandy.
looking for the init and how i set up the panel so i can set my lay out and put my Swing objectts in ta it......thkz partners yeeeeeeehaaaa
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
yes u need a Container in swing to place a components on.Here is a sample JApplet ,which shows u the use of Container and the layout.
import java.awt.*;
import javax.swing.*;
public class japplet extends JApplet
{
Container cont;
JButton b;
public void init()
{
cont = getContentPane();
b = new JButton("Button");
cont.setLayout(new FlowLayout());
cont.add(b);
}
}
Raj
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Jay Z and Rajendar G your chosen names don't meet the javaranch naming policy. Please read the policy here and re-register if you want to continue posting. A correct user name: first name + space + last name using no initials.
Thanks,
Manfred.
 
JAY MaCaNaWallChucK
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
please buy my thing and then I'll have more money:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic