Solved

Java Applet Won't Allow Anything Else on its Page

Posted on 2004-04-15
9
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

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
 

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

729 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