This is a split board - You can return to the Split List for other boards.

Java Coding Help needed - Please help if you can...

  • Topic Archived
You're browsing the GameFAQs Message Boards as a guest. Sign Up for free (or Log In if you already have an account) to be able to post messages, change how messages are displayed, and view media in posts.
  1. Boards
  2. PC
  3. Java Coding Help needed - Please help if you can...

User Info: ElDudorino

ElDudorino
2 months ago#11
Yeah, I didn't get the impression that it fell within the scope of your assignment. Maybe next time.

User Info: Voidgolem

Voidgolem
2 months ago#12
assumption: eventual goal is to log your text history as a string array or ArrayList:

in which case mirroring it is easy once you actually have that list established: just have your print statement start at the end of the array instead of the 0th element.

the thing about coding is that upwards of 80 or 90% of it's already been done somewhere. Most of the job is finding who's already done it close enough to right for your purposes, know how and why what they did worked, and then repurpose it.

problem off the top of my head is it doesn't quite work for real-time inputs/display updating. It'd work for after you throw in a couple sets of texts, but notsomuch the most recent one (e.g. the phrase you're in the process of typing wouldn't be mirrored, but your previous submissions would be). Hm. Probably some UI trickery that could be done there.

In angularjs it's like a 5 minute databind job, that doesn't really apply to straight Java, though.
https://i.imgur.com/Uiyemc7.jpg

User Info: GeminiX7

GeminiX7
2 months ago#13
So I have declared ta3 but I'm not sure what I actually need to do to reverse the text in that invisible buffer text area so I can pass it off to ta2.
MSI Z97| Intel i5-4690 @ 3.5 Ghz | 8GB Cosair Vengence @ 1600 |Radeon R9 390 8GB
Who gave you permission to talk to me, mongrel?

User Info: ElDudorino

ElDudorino
2 months ago#14
Oh, in the buffer area you wouldn't need to reverse anything. It's just there as a quick and dirty way to back up ta2.

Currently your code populates ta2 with the text from ta1 but that becomes problematic when you reverse ta1, so that's why I created ta3, passed everything from ta2 except for the textfield there, and then copied that back to ta2.

ta1 will already be in reverse order if you replace your setText line with the append line I gave you before.

I'm writing this from my phone without looking at the code so hopefully that makes sense.

User Info: Lienhart

Lienhart
2 months ago#15
GeminiX7 posted...
So I have declared ta3 but I'm not sure what I actually need to do to reverse the text in that invisible buffer text area so I can pass it off to ta2.


If you are doing what the dude asked earlier (to append) you don't need to do anything. And if you want it the other way, just grab the length of the string and append at index via length.
  1. Boards
  2. PC
  3. Java Coding Help needed - Please help if you can...

Report Message

Terms of Use Violations:

Etiquette Issues:

Notes (optional; required for "Other"):
Add user to Ignore List after reporting

Topic Sticky

You are not allowed to request a sticky.

  • Topic Archived