Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need to set the alignment on the label. It's filling the scrollpane by default.

label.setVerticalAlignment(SwingConstants.TOP);
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Try

jScrollPane1.setViewportView(new JLabel("Connecting to the database. Please wait...")

and when the table is ready

jScrollPane1.setViewportView(table);
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I would recommend constructing your UI components as you normally would, outside of the done() method, and just use done() to add the List contents.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Remove the left parenthesis so you just have }; It's just a minor syntax error in the anonymous class declaration.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Take a look through this tutorial on concurrency in Swing

SwingWorker invokes a worker thread in the background that does not tie up the event queue. SwingWorker may publish results for updates on the event queue, but it does not have to.

SwingUtilities.invokeLater() schedules a task to run on the event queue. While the task runs, nothing else on the event queue will be processed - so your GUI will be unresponsive pending completion of that task. That is why you don't want to process long-running tasks directly on the event queue.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Or just create your own small wrapper model.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No one is going to answer quiz questions for you.

Formulate your own answers and if you have uncertainties, ask specific questions. Explain your reasoning or thoughts on the areas you doubt,

Demonstrate some effort in the process if you want others to take their own time to help you.

jon.kiparsky commented: Testify, brother. +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Take a look at this section on using JList with a mutable model:
http://download.oracle.com/javase/tutorial/uiswing/components/list.html#mutable

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This is not a homework completion service. Post the code that you have done so far and post specific questions or error messages that you are having trouble with.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Re-read that for() line. You have two unnecessary characters in it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

getString() returns the value of the column in the current row of the result set. This means that you already have a reference to the row or its location, so it is simply a matter of returning the value of the column as a String. Your iteration or access methods will need to maintain that reference to the current row.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You already have a section where you are updating the maxScore. You can update more than one thing in that if() block if you add some braces (which you should always use anyway).

You don't need to grab a previous string - you just need a new variable to hold the max score player name.

soccer13 commented: Helped me through all problems in my program +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Take a look at the Space Invaders tutorial there. It is a 2D sprite game.

NewOrder commented: thanks EZZral +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Can you post your getValueAt() code?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Did you make any changes in your getColumnClass() method? What prompted the class cast exception?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You only have a partial expression after your OR operator

if (outsideTemperature < -58 || > 41)

You aren't comparing anything to 41 in that statement. If you want to check it against 'outsideTemperature' then you must state that explicitly. The compiler just sees that you have nothing on the left hand side of the '>'.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, line 12 is generating a random int from 0-5. So what effect do you think that has in line 13?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Sure, with an embedded database it's no trouble. We do this with H2 for every new project when it's first created. You just run a script with your data definition code in it.

Edit: H2 can also create an in-memory database that does not persist when closed.

codeFaceMcGee commented: Exactly what I needed. +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Add "\n" for a line break. You can inline that with the text if you like. ie +"\nBall position: " Edit: You can also look into the String.format() method if you like.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Calculate the center point (appW/2, appH/2) and then use those to figure where to place your upper left corner of the rect.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

By using a binary installer or reading the instructions?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Here you are checking pieces [a][b] for null, but calling print on pieces [9-a][b]

if(pieces [a][b]!=null){
  array[a][b]=pieces [9-a][b].print();                    
}
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You've used an invalid identifier to get the column. I used the column name in the code above, since the identifier defaults to the header value.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You stack trace will indicate the exact line that the error is occurring on.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can probably use BorderLayout for that with your tree in the center and buttons at south.

There are plenty of other layout options if you want to gain more control over positioning. Just take a look at the contents listing at the left side of that tutorial link.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

>open=fun.java // my program name

You cannot run ".java" files. You can run classes or jars.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Actually, Jon is very helpful around here. He assumption that you don't know the language well stems directly from the fact that you posted that you didn't know how to use classes and method within interfaces.

Perhaps you can start here to learn interfaces: http://download.oracle.com/javase/tutorial/uiswing/

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Some issues from the redesign were discussed and have now fallen well off the radar so I wanted to bring them back to page one:

- "Edit/Delete" button: Complete misnomer, because it does not offer the ability to delete.

- No [icode] button on either of the post editors. Some who answer questions here do use that tag.

- Page navigation on multi-page threads and forums is still only at the bottom, along with the Mark Forum Read option. It's a pain in the ass to have to scroll to the bottom to see/navigate other pages of a thread. You cannot even tell that a thread has more than one page unless you go to the bottom of the page.

- The "Start A New Thread" button at the top of the forums is barely distinguishable from a line of text and does not readily present itself in the forum listing.

- Font/table size on the forum thread listings is still huge. Luckily this can be dialed back smaller in Firefox or I would have given up trying to read the listings at all.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Write a project topic generator. Please.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So start coding!

Post specific questions when you run into troubles and perhaps someone can help you through them.

You aren't expecting someone to write this for you, are you?

Lusiphur commented: Exactly! +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Create a method in your Dimensions class to add a Dimension to the instance and return a new Dimension with the result

public Dimension add(Dimension d){
  ... add dimensions and return the result ...
}
Xufyan commented: thnX :) +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Please mark this thread as solved :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The "Edit/Delete" button continues to cause confusion amongst users, since it doesn't actually allow them to delete the post. I believe this was on the list of things to address with the new design months ago and may have fallen off the radar.

~s.o.s~ commented: Confusing indeed +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Maybe.

You're welcome.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It seems to work fine if you make the combo box uneditable and add the key listener directly to the JComboBox component instead of the editor

fromComboBox.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent event) {
            fromComboBoxKeyKeyPressed(event);
    }
});
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Another amazing finding!!11eleventyOne!
http://www.hoax-slayer.com/wingdings-911.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Perhaps someone can, but you're going to need to show some effort on your own.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> can nay on etell me tht why if i am moving a ball thn my hurdl also moving .
Why should anyone waste their time replying to this lazy gibberish? Perhaps you should take the extra 10 seconds to type a legible question if you want others to take it seriously.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Question post more words.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Step into the elevator and look in the lower left corner by the door. There is a loose edge of carpet. Peel that back and open the small hatch below. Inside the hatch, you'll see a very tiny monkey. If you hand him a baloney sandwich, he will share a secret with you: "Resurrecting 6-year-old threads on IT discussion forums won't open this elevator."

I can't help you much beyond that. Sorry.

Sodabread commented: Brilliant! +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Narue >> That quoting method is worse than awful. Pick one method and stick to it, don't combine them. okay, fine. I like the concept of quote tags, and i like the boxed out separation, but the font face makes me ill. so i'll go back to the old newsgroup variation.

But there are still possibilities remaining! :icon_surprised:

Aia commented: Think inside the box! Not bad. ;) +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

nope googled my name and this came up, not cool theres no need for that. I've since deleted all my info but still its the principal.

The acceptable use policy clearly states that member profile information may be publicly visible and entering it is entirely optional: http://www.daniweb.com/forums/faq.php?faq=privacy_policy#faq_member_profiles

If your info is still showing in Google after you removed it, then I suppose that's an issue you'd need to take up with them. DaniWeb has little input into Google's searching, indexing, and caching mechanisms. It may be that it will disappear the next time they spider the site. I really can't say.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I can haz more chaos?

jephthah commented: hah +0
Nick Evan commented: That looks disgusting; so: nice :P +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

She's referring to putting "..." in quote and placing the quoted text below the actual quote.

Edit: Cross-posted :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So they do have more colors than purple! :P

jonsca commented: Read my mind +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

URLS changed to "example.com" to be generic and still preserve the question.

wonderland commented: Helped me with a topic editing (outside of forums options) :) +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

me i lways eating vegetables..

You could stir-fry them with spam.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, I'd agree that it's somewhat hidden up there at the top. I think it's previous location just below the last post is probably the best place for it if we're to have any chance of new posters using it.