yeah i was frustrated like, what the hell!? this statement doesnt do anything to cut the letter from the word, i didnt know or i think i really forgot that this method returns a string value, and i...
Type: Posts; User: chronoz13
yeah i was frustrated like, what the hell!? this statement doesnt do anything to cut the letter from the word, i didnt know or i think i really forgot that this method returns a string value, and i...
oops, i didnt noticed substring() method returns a string LOL :p
- your statement really woke me up,
- thanks for refreshing me back, i forgot that there is a StringBuilder class that can manipulate strings
if (word.length() > 0) {
...
thanks again for the suggestion! finally got what i needed
if (word.length() > 0) {
StringBuilder strB = new StringBuilder(word);
...
oh thanks for guiding me through that,
i never thought that the word keeps on expanding each time im adding on it, i think i should use another string instance, or the substring() method
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class BackSpaceSample extends JPanel {
private String word;
public BackSpaceSample() {