• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Display in the panels

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to solve a problem in my project,related to the display in the panels.The problem is as follows..
We have two panels in an applet,the top panel will have buttons and two text fields,and the bottom panel is blank.when the user enter the company name in the text field and press submit button,
the homepage of the company entered should be displayed in the lower panel,but when we try to do the same it displays the output in a new browser window.
we are using the code appletcontext.showDocument(urlof company,lower panel).
This is very urgent.
Thanks in advance
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
See may be this will help?
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class EvenPanel extends Applet implements ActionListener
Button b;
TextField tf1;
TextField tf2;
Panel p1;
Panel p2;
public void init()
this.setLayout(new BorderLayout());
tf1 = new TextField("", 20);
tf2 = new TextField("", 20);
b = new Button("OK");
p1 = new Panel();
p2 = new Panel();
this.add(p1, BorderLayout.NORTH);
this.add(p2, BorderLayout.SOUTH);

public void actionPerformed(ActionEvent e)
Object source = e.getSource();// Get the source of the Event
if(source == b)
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sbezawada and Max,
Thanks for posting your messages. Please be sure to register with proper names. See here for details: http://www.javaranch.com/name.jsp
If you do not register properly, your accounts will be disabled. I would hate to see that happen.
Thank you.
    Bookmark Topic Watch Topic
  • New Topic