Forum: Java May 2nd, 2006 |
| Replies: 3 Views: 11,576 The problem is in the paintComponent method of your MyPan class.
It should look like this:
public void paintComponent(Graphics g)
{
super.paintComponent(g);
g.drawString("Hello... |
Forum: Java Oct 25th, 2005 |
| Replies: 4 Views: 4,671 kk nevermind, I figured it out. ;) |
Forum: Java Oct 25th, 2005 |
| Replies: 4 Views: 4,671 Hi all
I am programming a database-related application in Java. I have to facilitate several different types of queries, but I'd like to use the same JTable to display the results of each query... |
Forum: Java Jun 13th, 2005 |
| Replies: 5 Views: 5,186 excellent. Thanks server_crash. :D |
Forum: Java Jun 12th, 2005 |
| Replies: 5 Views: 5,186 |
Forum: Java Jun 12th, 2005 |
| Replies: 5 Views: 5,186 Hi all...
I have a JFrame, which contains a JTabbed Pane, which contains two JPanels.
The problem is that when I run the program, a completely grey frame shows up, and the contents only becomes... |
Forum: Java Jun 11th, 2005 |
| Replies: 4 Views: 1,578 The prof probably meant for you to write up a method that does it :!: |
Forum: Java May 6th, 2005 |
| Replies: 15 Views: 5,672 The original code as in...
jta.append("Some text!");
jta.setCaretPosition(jta.getText().length());
.. not my original code. :mrgreen: |
Forum: Java May 6th, 2005 |
| Replies: 15 Views: 5,672 Sorry, my bad. I seem to have added the code to one append point and not the other. oops.
The point being... the original code worked! Thanks DeepZ. Much appreciated. |
Forum: Java May 5th, 2005 |
| Replies: 15 Views: 5,672 hi...
I tried this. It seems to have helped just a little, because instead of never showing new text, the scroll pane now remains just one text line behind i.e. the newest line of text appended is... |
Forum: Java May 3rd, 2005 |
| Replies: 15 Views: 5,672 yep. Thanks jtwenting. Remember you helped test my chat system? ... :cheesy:
Any idea on the scrollable chat windows? A chat client with non-scrollable windows is... pretty much a disaster. |
Forum: Java May 3rd, 2005 |
| Replies: 15 Views: 5,672 stupidenator: Thanks for that! I searched the JFrame API for the word 'resize' and nothing came up, so I was at a loss. :cheesy:
paradox814: I did that, as I've mentioned up there. It just didn't... |
Forum: Java May 2nd, 2005 |
| Replies: 15 Views: 5,672 Hi all
I've programmed a relay chat system in Java. Just having two GUI-related problems with the chat client itself.
Problem #1 : I can't get the chat windows to scroll as new text appears in... |
Forum: Java Apr 29th, 2005 |
| Replies: 2 Views: 1,698 You just keep a counter. Something like this:
int count=1;
while (count<51){
<dice rolling bit here>
count++; |
Forum: Java Dec 8th, 2004 |
| Replies: 2 Views: 16,091 Actually, to display either a HTML or text file in a browser window ...OR... just a text file in like Notepad or something. |
Forum: Java Dec 8th, 2004 |
| Replies: 2 Views: 16,091 'ellos
So I'm making a Hangman game, and for the sake of completeness I want to have a HELP feature. When the Help button is clicked, a browser window should open up (not *within* the game... |
Forum: Java Sep 18th, 2004 |
| Replies: 1 Views: 1,974 hmmm...
I don't have Java installed on this computer, so I can't run your program... but the static method you are calling returns a boolean value, so this ActionListener bit should be... |
Forum: Java Sep 18th, 2004 |
| Replies: 16 Views: 4,729 oops, couldn't edit my post.
Ignore the last bit. So, basically.. you get your applet's init() method to call all three above-mentioned methods. And get your YES button ActionListener to call the... |
Forum: Java Sep 18th, 2004 |
| Replies: 16 Views: 4,729 psylocke... you should really learn to program more modularly & object-orientated-ly. If you had, making little modifications to your program (and controlling the flow of the program) would be much... |
Forum: Java Sep 18th, 2004 |
| Replies: 2 Views: 4,409 Well, assuming you structured your program decently... just get your YES button ActionListener to call the appropriate method of whichever object is controlling the game (flow).
If not, structure... |