Ok, added another example in my previous post.
Dialog.show() / hide() - use setVisible(true/false), same for Window I think
List.addItem(...) - use add(...)
Component.enable() / disable() - use setEnabled(true/false), same for MenuItem
TextArea.replaceText(...) - use replaceRange(...)
List.isSelected(...) - use isIndexSelected(...)
TextArea.appendText(...) - use append(...)
Component.preferredSize() - use getPreferredSize()
Component ... for everything with ...size(), just add "get" to the beginning of the method name
Container.countComponents() - use getComponentCount()
" if(getComponent(i).getPeer() != null)" use " if (getComponent(i).isDisplayable())"
That ought to be it. A DataInputStream can be boxed into a BufferedReader with:
BufferedReader br = new BufferedReader(new InputStreamReader(in));
Then you can use br.readLine() instead of in.readLine().