Feb
4
comment Java: Jsch with Swing Interface
And the question is? Do my interface for me?. You should demonstrate effort by showing an attempt at building the interface yourself, and ask concrete questions ("why is this not working"). The fact that you are using jsch and ssh is unrelated to what appears to be your actual question: "how to place a JTextField and a JTextArea in a window".
Feb
4
answered Develop GUI for blast cmd application
Feb
4
comment Develop GUI for blast cmd application
alaa - avoid "Hope you getting my point" or "Thanks" - anything that does not describe or clarify the problem is distracting, and should not be part of the question.
Feb
4
answered Web app that runs commands in remote machine
Feb
4
awarded Enthusiast
Feb
3
answered Degree of connectivity of a graph
Jan
31
comment Applying State Pattern
Why not use a classic state-machine? Draw a picture with the states and the transitions between them, and when you write the program, make sure to use descriptive names for the states: hasPulled, hasPushedAfterPulled, hasPlacedKeyAfterPullingAndPushing
Jan
31
comment i dont know what im doing wrong, any help would be appreciated
Peter, you've copied and pasted a statement, a lot of code, and a vague complaint that something is wrong. What you should post is the real output, the expected output, and, as narrowed down as possible, the place where you suspect the error may be.
Jan
31
comment Swing JPanel layout manager
You should explain what is different from the original version, and why your change solves the problem. Code-only answers should be very, very self-evident to be good anwers - otherwise, add explanations!
Jan
30
revised Character strings to binary string - why are some characters multi-byte?
rewrote for English and title clarity
Jan
30
comment Character strings to binary string - why are some characters multi-byte?
The ASCII code only has 256 symbols (one per possible byte value). The lower 128 symbols are the same as UTF-8, ISO-8859-1, and other popular encodings; so as long as you do not use non-english symbols, you may think that everything is just ASCII.
Jan
30
answered Character strings to binary string - why are some characters multi-byte?
Jan
28
comment How to externalize a MouseListener?
I do not understand your comment. You do not "externalize" things just for the joy of it - you add new classes to embody new concepts, or to subdivide the responsibilities of existing ones. "How to externalize" depends on "why externalize". The above approach works for any number of classes, and simply decouples listeners from their actions in a safe, readable way.
Jan
27
answered Java synchronization on Object. Why doesn't this deadlock?
Jan
27
comment How to externalize a MouseListener?
You would not need any "if-conditions" when using this pattern (or at least, not to decide which label had been pressed). As guleryuz pointed out, if you have a bunch of components that subclass X and behave the same, by all means, write a subclass of X that includes the behaviour baked in, to avoid any duplication.
Jan
27
comment How to externalize a MouseListener?
I tend to write one class for the UI (more if parts of the UI are complex enough), and launch it from the main class. Main classes should generally only do the launching, but not contain the code to be launched. The not-quite-handler methods should then call the relevant domain-model code, which should know nothing at all about the existence of a UI: look up model-view-controller separation; which is often reduced to model-view+controller, with V&C rolled into one.
Jan
27
comment How to externalize a MouseListener?
Comparing Strings via == is very dangerous. Use equals() instead (since Strings are objects).
Jan
27
answered How to externalize a MouseListener?
Jan
19
reviewed Approve suggested edit on Execute certain methods on object creation from constructor
Jan
19
comment Execute certain methods on object creation from constructor
Ah, I see that you have just edited it. As it is currently phrased, it does not make much sense. I suggest changing "which is initialized" to "which is then called"
1 2 3 4 5