I'm trying to write a little script to send data to another machine, and just read any message I get in return.
so I do something like:
import socket
import select
s = socket.socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
s.connect((<host>, <port>))
s.send('sometext')
[input...
If I'm understanding your code correctly (I just glanced at it) I think declaring myArray as a class variable instead of a method variable would help. So:
public class ItsMe extends JFrame implements ActionListener
{
...
private ArrayList myArray;
...
You can do something like:
String input = "111111111"
char[] replaced = input.toCharArray();
replaced[3] = '0';
input = new String(replaced);
I'm not sure about TreeSelectionListener, but do you at any time alter the dmtn in your click-and-expand method? Or do you alter Node at all?
If you get a set of the values in the HashMap, (by say doing HashMap.values()), and remove one of those values from the Set or the Vector that results...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.