Question:
What is the EASIEST way to print text vertically instead of horizontally in Java?? ( a rotation of the word)?
skwash033
2007-03-30 10:27:35 UTC
trying to print a line of text horizontally and vertically where they cross each other and i know how to print the text horizontally but not vertically or even rotate the word. anything will help.
Three answers:
bonkers
2007-03-30 10:46:05 UTC
I don't know Java, but you can do a for loop:



for ( i = 0; i < stringLength(string); i++) {

print string[i] . "\n";

}
?
2016-11-25 05:01:48 UTC
Drywalling has in no way been my accepted occupation yet I easily have put in various it over the final 40 years. for the duration of that factor i won't be in a position to undergo in recommendations ever putting a sheet horizontally till it replaced right into a patch on an latest wall. As I see it, all that's to be gained with horizontal setting up is a alleviation in taping. i in my opinion question the very undeniable fact that horizontal setting up provides potential. it form of feels to me that when one screw is put in each sixteen inches on the middle seam as destructive to a screw each 6 inches on a vertical seam the potential ought to bypass to the vertical. i need to be incorrect yet whilst 14 a million/2 inches out of sixteen inches is left unsupported i in my opinion ought to question the potential argument. I do a splash figuring till now I initiate and whilst i'm executed, I easily have production facility edges everywhere however the corners. that's basically a rely of measuring the stud placement and finding out the place to hold the 1st sheet interior the midst of the wall. i latterly did my kitchen as I easily have defined and with careful taping and guidance for paint that's somewhat very confusing to locate any of the joints. The paint is intense gloss and the partitions are no longer textured in any way. I made a multitude of one hollow for a swap yet like I reported that's no longer my complete time occupation. on your issue i in my opinion think of vertical makes extra experience as there will be NO seam in each and all of the partitions aside from the corners. Now that must be greater than having a center seam. upload the better ease of setting up and that i won't be in a position to think of doing it any incorrect way than vertical. have exciting, I easily have a bath which will require a similar scientific care quickly. BTW, are you finding for a job??? LOL
2007-03-30 10:53:02 UTC
ok so use the textbox class, you may have to import:

import java.lang.Object.*;

in first line of code

next we need to draw the textbox and fill it with text:

Textbox textybox = new Textbox("text goes here");

ok we now need to use a new class to rotate it:



public VTextIcon(Component component, String label) {

this(component, label, ROTATE_DEFAULT);

}



public VTextIcon(Component component, String label,

int rotateHint) {

fComponent = component;

fLabel = label;

fRotation = verifyRotation(label, rotateHint);

calcDimensions();

fComponent.addPropertyChangeListener(this);

}



public void setLabel(String label) {

fLabel = label;

// Make sure the current rotation is still legal

fRotation = verifyRotation(label, fRotation);

recalcDimensions();

}



//you need to create a new panel here named "panel"

VTextIcon textIcon = new VTextIcon(panel, "text goes here");


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...