• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problem in GridLayout

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I have written a simple applet program and trying to display it , but I'm not able to see my subcomponents, only it shows a box of that size which i mension in my HTML File.
Here is the code for both files.
GridLayoutPanel.html
< applet code=GridLayoutPanel height = 300 width = 300 >
< /applet>
*****************
GridLayoutPanel.java

Pl.help me.
Thank you very much.
jaydeep

(Edited by Cindy to format code and add spaces to the HTML commands so that they would display instead of executing)
[This message has been edited by Cindy Glass (edited February 10, 2001).]
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure and don't have time to try what I am suggesting, but here is what I think:
Where are you adding the panel to your applet? You should use this.add (panel) or something like that.
Muhammad Ali Shah
Karachi, Pakistan.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaydeep,
I can't see your HTML code but your java code works for me. My HTML code uses the following parameters to run your code:
CODE="GridPanelLayout.class" WIDTH=600 HEIGHT=400
When I run it with the JDK1.2 appletviewer I see a label on the left with a button to the right of that and 3 textfields to the right of that. All components are on top of the applet area.
Manfred.
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi jaydeep;
u'r code is running fine on my comp!!i don't know what's the problem when u'r running the code!!i made the following html file--->
GridLayoutPanel.java
---------------------
/*< html>
< body>
< applet code="GridLayoutPanel.class" height=400 width=400>
< /applet>
< /body>
< /html> */
and the following code in java program --->
GridLayoutPanel.java
--------------------

and i had absolutely no problem!!

ankush!!

Edited by Cindy to format code and add spaces to HTML commands so that they would display instead of executing.
[This message has been edited by ankush walia (edited February 10, 2001).]
[This message has been edited by Cindy Glass (edited February 10, 2001).]
 
Jaydeep Singh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to Mohammd, Manfred and Ankush for your help. I got the problrm in my HTML File.
Thanks
Jaydeep
 
Crusading Chameleon likes the size of this ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic