#How do u format a line so it doesnt cut off?

1 messages · Page 1 of 1 (latest)

west pier
#

i have no idea how to format this. also how do u change text color?

vital trailBOT
#

<@&987246399047479336> please have a look, thanks.

vital trailBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

shut mural
#

Count chars and then put a /n

#

Also u cant change color of consol output

#

Well u could do color a if in batchfile

merry abyss
#

@shut mural could also create a text based gui and change whats outputted for color and where.

merry abyss
shut mural
#

You draw the String with Graphics2D and apply the color

merry abyss
#

You could also set the = and - lines equal in length to the longest description string, and set them equal to each other.

west pier
#

Oh okay, thanks!

#

I’ll try that

#

how would you make it so that it doesn’t cut off words when it reaches maximum char limit?

merry abyss
# west pier how would you make it so that it doesn’t cut off words when it reaches maximum c...

The simplest answer would be to be concise with the description. That would involve the least amount of code. However, it would be the best in the long run to have the description reach the char limit of the = and = - and be printed out on the line below it instead. Doing this, you could simply use for loops as long as you figure out how many chars are in those. You might need nested for loops to accomplish this. I did something similar with a previous final project of mine in one of my classes for a text base social media app. Also, there are formats for string that could help, not sure if you are aware of them yet. https://www.geeksforgeeks.org/formatted-output-in-java/

west pier
#

I’ll try that, this was for my CS honors project and I have the class in like 1 hour

#

Thanks!