Solved

Java Applet Won't Allow Anything Else on its Page

Posted on 2004-04-15
9
223 Views
Last Modified: 2010-05-18
Hello,

Thanks for reading our question.  We have a java applet.  It’s a chat room.  We want to add a banner rotation applet above it.  When we put the chat applet alone on a page, and set its dimensions to 100% x 100%, the resulting chatroom sits dead center in the middle of the page and is infinitely resizable.  You can make the window even super teensy, but the whole applet shrinks or enlarges to any dimension of the page.

However, if we add <i>anything</i> else above the chat applet, even just a <p>, then the lower edge of the chatroom falls beneath the visible.  You can still drag the window to any dimension, but the bottom edge of the chatroom always bleeds off.  Is there any way to add something to the page a java applet is on and still keep all the edges of the applet visible, and have it automatically resize to any window dimension?

Many thanks,

Yunkaa

We have tried putting both in a table and setting the table to 100% width and height, but still the lower edge of the chat applet falls beneath the visible.
0
Comment
Question by:yunkaa
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:sc0rp10n
ID: 10839676
Hi Yunkaa,

Personally, I dont believe using % values for applet sizes is a good idea. For your situation, I would suggest, the following:

- While page loading, get the window's available width and height,
- then calculate the proper values that you would want to have for the applet, and
- write those values to the applets widht & height params.

Also, for placement of the applet, if the table doesn't work, try using <div> tags and setting the width and height in the div's style properties.

I'm sure you need to play with this for a bit to get it right.

goodluck, HTH.
Ajay


0
 

Author Comment

by:yunkaa
ID: 10840542
Hello,

Is there any workaround for this?  We'd love to be able to add something to this page.  The users are really happy with its performance, drag it any which way.  The situation: a chat applet set at 100% x 100%.  Opens in a popup.  We want to add a banner applet above the chat.  Putting tha banner on the page with the chat causes the chat to fall off the lower edge of its window.  Puttin anything on there, a <p> does the same.  Anyone have a little magic code lying around.

Many thanks,

Yunkaa
0
 
LVL 7

Accepted Solution

by:
mark-b earned 500 total points
ID: 10843142
How about a two framed frameset?  

Ex:

<FRAMESET ROWS="53,*" FRAMESPACING="0" FRAMEBORDER="0" MARGINHEIGHT="0" MARGINWIDTH="0" BORDER="0">
 <FRAME SRC="banner.html" FRAMEBORDER="0" BORDER=0 SCROLLING="NO" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0" NAME="BANNER">
 <FRAME SRC="chat.html" NAME="MAIN" FRAMEBORDER="0" SCROLLING="YES" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0" BORDER=0>
</FRAMESET>

Have the 'banner.html' contain the banner applet for your banners, and have the 'chat.html' contain the chat applet (still at 100% x 100%).
0
 

Author Comment

by:yunkaa
ID: 10844240
Hello,

Well...!  WELL?!!! YOU ARE SUCH A <b>SUPER MAGIC EXPERT!!!!!!!!!!!!!!!!!!!!!!!!!!!</b>  Thank you, THANK YOU!! Please get the wizard's hat.  We fooled around with frames for half the day but they kept collapsing on each other in resizing.  This is so WONDERFUL.  
=) =) =)

Please can you tell us which among the many zeroes here should we work with to create some margins around the outer edges of the "page".  And, again... so many thanks.

Yunkaa
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:yunkaa
ID: 10844428
We have posted a follow up question... =)
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10844565
No problem.  As far as the margin goes, I guess I would suggest you do it by style (in the applet.html file, not in the frameset html file):

<html>
 <head>
  <style type="text/css">
    BODY {
     margin:50px;
    }
  </style>
.
.
.
</html>
0
 

Author Comment

by:yunkaa
ID: 10844677
Hello MArk,

THanks agian.  What we should have wrote is that we WILL BE POSTING  a follow up in another question.  We weren't trying to be pushy!  We have posted that follow up now.  Will probably make more sense there.  And again, aginn x 1,000,000 THANK YOU! :) :) :)
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10844891
Glad I could help!, and thanks for the points.  

Looks like Cd& has a good answer your other question.

-Mark
0
 

Author Comment

by:yunkaa
ID: 10845481
Hello Again Mark,

And, you REALLY did help.  We would never have been able to do it without you.  We were totally stuck.  The developers were dragging their feet, and we were at our wits end.  Our HTML editor was just returning preloaded pages for frames, so we just gave up.  We had Frankenstiened a work around, involving giving the chat applet a height of 80%, but it just looked so rickety.  And, the chat before was so nice, so suddenly rickety was not what we were searching for.  Thank you again for sharing your expertise.  You saved the day, for sure. :))))))))))))))))))))))))))
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem with http basic authentication 5 98
How to make similar contact form? 8 65
website content maintenance 3 81
JQuery tracking event. 3 57
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to count occurrences of each item in an array.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now