• 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
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Applets alignment. cache & POST

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to know howto align my radio buttons at center bottom.
I also want to know howto POST from Java Applet to a PHP page.
Last i want to know howto make an applet stop caching so you don't have to close browser to see new content.
Can anybody help ???

Here is my applet code:


I'm new at Java Applets so i properly wont be able to understand unless you keep it simple.
Thanks in advanced.

Carsten S. Rasmussen
 
Marshal
Posts: 27590
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carsten Rasmussen wrote:I want to know howto align my radio buttons at center bottom.



Well, this question isn't specific to applets, it's a general Swing question. The short answer is that you use a suitable layout manager, or combination of layout managers. Here's a link to the Oracle tutorial about layout managers: http://download.oracle.com/javase/tutorial/uiswing/layout/index.html.

I also want to know howto POST from Java Applet to a PHP page.



Likewise this question isn't specific to applets, it can be asked about any Java application which needs to connect to a server. Here's a link to an Oracle tutorial about connecting to URLs and sending and receiving data: http://download.oracle.com/javase/tutorial/networking/urls/index.html. The only applet-related thing is the applet methods getCodeBase() and getDocumentBase() which might help you find your way back to the server from which the applet was downloaded.

Last i want to know howto make an applet stop caching so you don't have to close browser to see new content.



Go to the Java control panel. Select the General tab and click the Settings... button in the Temporary Internet Files section. You will see a Delete Files... button in the popup window, click that and choose the appropriate option from its popup.

You'll notice I linked to several tutorials. Since you're new, the best way to learn about particular topics in Java is to work your way through a tutorial. Work with the code in the tutorial and modify it to do something more like what you want to do, rather than just trying to write code from nothing.
 
Carsten Rasmussen
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to know how to align my textfield and buttons so far i have manage to make this:


As you can see my button and textfield are align to the left but what if i want to align the button at bottom and textfield at top.
This time i want to see some codes, thank you
your regards Carsten

Ps. this is one of my first java scripts
PPS. i know how to google, i really want to learn ill be your student if possible
PPP: I tried turning off caching on JAVA på i still have to reopen browser to see new content
 
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carsten Rasmussen wrote:I want to know how to align my textfield and buttons so far i have manage to make this:

As you can see my button and textfield are align to the left but what if i want to align the button at bottom and textfield at top.



This requirement does not match up with your earlier description about centering radio buttons - since it includes no radio buttons.

Carsten Rasmussen wrote:This time i want to see some codes, thank you



I want a pony. Thanks.

Another way to put that is that you do not always get what you want. The earlier post provided some excellent links that should have been sufficient to solve this problem. *

Carsten Rasmussen wrote:Ps. this is one of my first java scripts



Please refrain from using the term 'scripts' when referring to Java. It is not a scripting language, and the association of 'Java' and 'script' is too often confused with the separate language 'JavaScript'.


* The previous reply was aiming to teach you to fish. OTOH I am willing to 'toss you a fish'. You might think this is more useful, but I feel the first post had far better long term value.

This code puts some radio buttons in the bottom of the applet's content area, centered, as well as the two other controls at the top of the applet, aligned left.

To compile and run it, try something like:



Carsten Rasmussen wrote:PPP: I tried turning off caching on JAVA på i still have to reopen browser to see new content



Those commands will open the applet in the JDK applet viewer. Since the applet viewer does not cache classes, it is a much better development tool than using an actual browser to check changes.



And before I forget. Please choose one form of the two common forms of delimiting code blocks and stick with it. E.G.



 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic