Results 1 to 3 of 3
- 09-28-2010, 04:32 AM #1
Member
- Join Date
- Sep 2010
- Posts
- 1
- Rep Power
- 0
Positioning println codes to corners
I'm new to java and i'm trying to allign my text to a specific corner
My text shows:
import acm.program.*;
public class assgn1_1 extends ConsoleProgram {
public void run() {
println("Mac is the best");
and when i compile it in cmd it show's up in the top left corner.
How would i go about moving "Mac is the best" so that when i compile and run it, it's in the right corner?
Thanks as i am completely new to JAVA
- 09-28-2010, 07:07 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,568
- Rep Power
- 15
Add some space to the front?
Really, println is only a simple stream output. It, in itself, does not format anything. If you want a specially formatted output then you need to format it before giving it to println (although with printf you can do the formatting and printing at the same time, the principle is still the same).
- 09-28-2010, 01:50 PM #3
Similar Threads
-
Println VS system.out.println
By ccie007 in forum New To JavaReplies: 2Last Post: 05-20-2010, 08:52 AM -
Positioning using setBounds
By thayalan in forum AWT / SwingReplies: 4Last Post: 04-28-2009, 01:59 AM -
I obviously don't understand positioning panels
By javatard in forum New To JavaReplies: 2Last Post: 12-10-2008, 07:48 AM -
difference between system.out.println() & out.println()
By wickedrahul9 in forum Advanced JavaReplies: 5Last Post: 10-18-2008, 11:06 PM -
panel positioning
By shwein in forum New To JavaReplies: 4Last Post: 09-09-2008, 05:15 PM
Bookmarks