SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old May 9th, 2008, 11:26 AM
Prytaeni Prytaeni is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 1 Prytaeni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 59 sec
Reputation Power: 0
Question Starting new lines/manipulating labels in applets.

Alright, so I'm in a Java Programming course at my High School with an incompetent teacher who is about a chapter behind the class. So, I must ask you for help, go you!

Anyway, to the problem: I have been doing applet assignments and I hate how when I run it everything runs together and sometimes wont start a new line and just run off the end of the page. Is there any way that a new line can be started, or perhaps x,y coordinates could be added in the labels?

--
Example:

//random code
Label lolNub = new Label("Yep, you're a nub.");
Label lolNot = new Label("Haha, that's what your mama said.");

public void init()
{
add (lolNub);
add (lolNot);
}

//output would sort of look like this, without the space words but with actual spaces lol.
Yep, you're a nub. [space space space] Hah

--

So anyway, is there a way to start a new line? Or to edit the x,y coordinates of the label? Yes, I've tried changing the HTML height/width but that doesn't work either. And I've tried "\n" but I guess that only works with console applications... Thanks!!! <3

Reply With Quote
  #2  
Old May 9th, 2008, 03:35 PM
Dijkstra Dijkstra is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Location: UK
Posts: 71 Dijkstra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 17 h 32 m 13 sec
Reputation Power: 1
Do a web search for "AWT Layout Managers". And then consider how best to layout your two labels.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Starting new lines/manipulating labels in applets.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway