+ 2

[Solved] java JTextArea(); problem

Hello PROgrammers! I have an issue using JTextArea(); in java... issue: When ever I try to write stuff on JTextArea(in app)... java writes the text on my panel aswell... so Whenever I delete text from my JTextArea... the text still remans in my panel... it does not gets deleted... mycode setup: //these are some codes I believe causing this problem(not sure) - panel.setLayout(null); - panel.setBackground(new Color(255,0,0,200)); //RGBA Other info: - I have made my panel background color to glass color(transparent color) using rgba - if I remove the transparency color, all works fine... Please, share the solutions to me if you find one :) Thanks much! https://www.dropbox.com/s/55venjpllwxmspf/VID_20200509_141155477.mp4?dl=0 - Orange

9th May 2020, 5:44 PM
KingDaniel2004
KingDaniel2004 - avatar
7 odpowiedzi
+ 2
Hello Mr. 🍊range I can't reproduce your problem. JPanel panel = new JPanel(); panel.setLayout(null); panel.setBackground(new Color(255, 0, 0, 200)); //java.awt.Color JTextArea area = new JTextArea(); area.setSize(100, 100); //frame size = 200, 200 panel.add(area); //add panel to frame Which Color package do you use? The Background is a kind of red (brown/red).
9th May 2020, 6:06 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Denise Roßberg check out this 6sec clip... About the issue https://www.dropbox.com/s/55venjpllwxmspf/VID_20200509_141155477.mp4?dl=0 the text that I'm writting applies to all my panel... so whenever I deleted text... it would not delete on my panels somehow my JtextFiled and my panel are synced crazy never had this issue before ;(
9th May 2020, 6:17 PM
KingDaniel2004
KingDaniel2004 - avatar
+ 2
Mr. 🍊range Very strange. Can you please show me your complete code? Btw: You are not using a PC? (I am wondering if your app or your smartphone causes this trouble).
9th May 2020, 6:20 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
I have no idea. And I am wondering which jdk you are using. Applets are deprecated and not supported since java 9 I guess.
9th May 2020, 7:25 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Denise Roßberg Oh... thanks for your help though 👍 Happy coding!
9th May 2020, 7:56 PM
KingDaniel2004
KingDaniel2004 - avatar
+ 2
Denise Roßberg I have finally fixed it LOL... It's repainting issue I added a new thread, and from there I repaint my panel every 3ms... By this way, when I backspace text, it's refresh the panel and runs smoothly again Idk whether is this the best way... But whatever, it's works fine for now That was nightmare XD Thanks for your help again though
10th May 2020, 1:09 AM
KingDaniel2004
KingDaniel2004 - avatar
+ 1
Denise Roßberg for sure... and I'm using pc (VScode) ***desktop application*** https://code.sololearn.com/cfcr8HMfSk72/?ref=app
9th May 2020, 6:23 PM
KingDaniel2004
KingDaniel2004 - avatar