Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

He could just as easily extend JPanel and plug those into whatever top-level frames he wants to use for the OS.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No, actually you can't. Read my post above. You dredged up an old solved thread to post a "solution" that is exactly the same as the original problem.

Don't use "==" for string comparison.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Posts can be edited within thirty minutes of posting. After that they will only be deleted if they violate the Daniweb rules or if there is some extenuating circumstance.

I do not see such a circumstance in that thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You already have a thread related to this. Closing this to prevent further mess.

Please keep it in this thread: http://www.daniweb.com/forums/thread334608.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The original question was from 2008 and I doubt he is still working on that code.

Mustaffa resurrected and hijacked this old thread with his vague, unrelated question, so I'm just going to close this to avoid further confusion.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So post some code and ask specific questions.

Show a little effort on your homework if you want anyone to offer any assistance.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This thread is a duplicate of http://www.daniweb.com/forums/post1418644.html#post1418644.

Closing this one. Please direct any further discussion to the other thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Correct.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Short answer: you can't.

There is a 30 minute window to edit posts and after that they are part of the great public archive that is the internet.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Perhaps shouting that you need something ASAP with multiple exclamation points puts off some who might answer.

Something to consider.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Detonation" - Trivium

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What are you talking about? There are no URLs anywhere in this thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can setUndecorated(true); , but that also removes the entire frame and close button, so you would need to add your own border.

The only other way I can think of is to add a component listener like

addComponentListener(new ComponentAdapter() {
    @Override
    public void componentMoved(ComponentEvent e) {
        setLocation(100, 100);
    }

});

But that still allows the frame to be pulled a tiny bit before it snaps back to the location, so it looks a bit odd when you try to drag it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What have you started? What are your thoughts about how to proceed?

Post your code. Ask specific questions and show that you have made some effort with this.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

arguments > internet

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

810

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

mentality > inclination

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

792

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Show some effort. Ask specific questions.

No one here will complete your homework for you.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

manual > instructions

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

637

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

@jon.kiparsky: I was referring to the difference between compulsory health insurance vs auto insurance. Auto insurance is a requirement if you drive, however driving is not a mandated activity.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> if you drive.
Is the point.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The DefaultRowSorter is blowing up when it tries to determine the column class in your model, because you are using the value of the first element to determine the class here

@Override
  public Class getColumnClass(int col) {
    return getValueAt(0, col).getClass();
  }

That's all fine and well when there is an element at index 0 to examine - not so much when the vector is empty.

You could try to return either a null or Object.class in that case. I'm not sure which one will may the default row sorter happy. You'll have to experiment or dig into its code.

@Override
  public Class getColumnClass(int col) {
    return cache.size()>0 ? getValueAt(0, col).getClass() : null;
  }
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, you didn't post the relevant part of your QueryTableModel class: tableModel.setQuery() , but it looks like your default row sorter isn't very happy about an empty data vector.

I don't think you're handling an empty result set quite right in your model.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Look at your declaration of the panel

JPanel Guess = new JPanel();

You have declared a plain JPanel here named "Guess" and added it to your frame. You actually need to declare an instance of your "Guess" class and add that to the frame

Guess guessPanel = new Guess();
myFrame.add(guessPanel);
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

GridBagLayout will certainly do that. Perhaps you can post the code? Basically you'll want something like the text area panel at x=0, fill=both, weightx=1, weighty=1 and the button panel at x=1, fill=none, weightx=0, weighty=1

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

519

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

joy > dish soap

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

519

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You declared "santa" to be a Snowperson, which does not have a drawHat() method. You need to declare him as a snowSanta if you wish to use drawHat().

(Also, please note the rules on "chat speak". Make the effort to type full-sentence English if you would like others to take their time to help you.)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Metropolis Pt 1" Dream Theater

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

515

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Option 1 in zetlin's post isn't quite correct either. Default (also known as package-protected) or protected access would allow the subclass to use the variable as well. It isn't necessary to make them public.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No one is going to do your homework, so either ask some specific questions and show some effort or stop cluttering up the forum with your assignments.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

489

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

We are really acquiring a wealth of knowledge about which movie stars are preferred by SEO spammers.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

broken > repaired

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

497

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need single quotes around the string value in your where clause, so that would be description='"+courseName+"'" A better way would be to use a PreparedStatement, which can re-used if you need to look up other course names

java.sql.PreparedStatement prepStmt = dbCon.prepareStatement("select * from emp where description=?");
prepStmt.setString(1, courseName);
ResultSet r = prepStmt.executeQuery();
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

509

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

lost > fallen

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

line > queue

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

evil > axis

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

[sorry, reply deleted - would not have worked with different colored areas]

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> Is there any way around this (without moving the corner points a pixel or two to hide the gap) ??
Not that I am aware of, short of declaring a general path that describes the outline of both polygons as a single entity.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Perhaps where instr(email, '=') > 0

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No one is going to just hand you this project. Ask specific questions and show some effort on this if you wish to receive help.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Deadworld" Shadows Fall