Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

how can i get the an my questionfrom this website?

You could start by making some sense I suppose.

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

Hold it! You are saying you did not notice scarlet on black?

Yeah, I just wasn't really paying any attention to what they were wearing. I tune most stuff like that out. It is a pretty ugly dress though.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

best left unfound

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you just want to append to the string generated by the parent class toString() method, use this

return super.toString() + " [" + college + "]";
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The Starting Java post at the top of the forum has many helpful resources.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Post the revised code.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yeah, I didn't even look at that line. The declaration is invalid and even if that is fixed, you can't use a method on that object in it's constructor call - because it doesn't exist yet.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And what is that error? It should indicate the nature of the problem and the line number on which it occurs.

One thing I would point out is the missing parenthesis on this method call Circle.radiusInt

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

How should we know? Is it doing what you expect it to do? If not, what is wrong with it? Be specific.

If you want someone to read it, you need to post it in [code]

[/code] tags so the indentation is preserved instead of that wall of unformatted mess.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I was pretty impressed with McCain's concession speech. It's definitely worth watching if you missed it:
http://www.youtube.com/watch?v=bss6lTP8BJ8

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Why would such a perfect and divine creator place useless part on animals.

Sense of humor? :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

My wife mentioned that she was sure to get some flak over that dress. Of course, my response was "huh? dress? I hadn't really noticed.". I guess stuff like that just doesn't even register with me very often.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Sure. But I'm just waiting to see if media's superman will miraculously "fix" all of America's problems.

I guess you have a long wait ahead of you then. Obama has made no claims to that effect. Sorry to rain on your hyperbole.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

There are several links on transitional fossils in the Evolution section at the bottom of this thread: http://episteme.arstechnica.com/eve/forums/a/tpc/f/770002407831/m/841006407831

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Definitely. I went by this morning before work. Flex time is great sometimes. Most all of the other 'before work' group was already gone.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

yeah im staying up all night (its all going on between 2300 and 0600 GMT)

Ouch! That's dedication! I'm hoping to be in bed by midnight here in Central Standard (GMT-6)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

17 views so far and I'm the only one who voted. :-/

Alex Edwards commented: Fine I'll vote too! XP +4
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

*shrug* Who knows? I just voted that apparently he thinks this is urgent (my own feelings of urgency may differ).

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I voted "very urgent please".

Perhaps if you post the code here in [code]

[/code] tags people will be a little more inclined to look at it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Global" is not the same as instance level scoping. Careful about using those terms interchangeably.

Scoping issue aside, I have to wonder why you nine different unrelated arrays to hold the properties of what should probably be a one dimensional array of objects that contain that data?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Not the first and certainly won't be the last.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I love listening to hardcore when coding, is that wrong?

Been listening mostly to Bullet For My Valentine, Trivium, Killswitch Engage, and All That Remains while coding lately.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Obama's actual positions on these issues:
http://www.ontheissues.org/Social/Barack_Obama_Abortion.htm

McCain seems to have changed his tune on abortion: http://thinkprogress.org/2006/11/19/mccain-abortion/

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Obama isn't.

Says your propaganda.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So then you do feel qualified to judge his Christianity. On what basis do you draw that qualification?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

He means that the thread isn't a yes/no poll, but rather a discussion on the for/against arguments. "I'm against" isn't an argument, it's merely a statement.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Neither are you.

Of course not, but then I didn't presume to call into question whether anyone is "really a Christian".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

cant u read?

Can't you write?

ACCOUNTING MAJOR...i dont have any background in this.this is the first and definatly the last cis course ill be taking ever.

YOUR COURSEWORK. Regardless of your background, you can either make the effort to pass or fail the course.

plus i really dont think i nything is wrong with my attitude.i only just registered and this was my first post.Also..plz dont waste ur time,i asked fr help..not a favor.

No, actually you asked and continue to ask for a favor. You can't even be bothered to type in proper English, just this IM-speak drivel. You're too lazy to communicate acceptably and too lazy to put any effort into the assignment. Why should anyone else put any of their own effort into doing your homework for you?

VernonDozier commented: Well said. +8
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Just because someone proclaims they are a Christian doesn't mean they really are.

That's true. I doubt you're qualified to judge the matter.

Obama is a quack.

MCain is a hack.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Do you know how out of date those documents are?

Do you have an contrary information to offer yourself, since you seem to be pretty concerned about backing things up?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Pixels cannot be floats, you need to convert them to int screen coordinates.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Why not start with the applet that I wrote for you that is very close to what you want to do? Did I completely waste my time trying to give you a simple, solid starting point?

If you will glance at that code, notice that all operations using the Graphics class occur in the paintComponent() method and those method calls just use the coordinate variables in the class. The mouse listener alters those coordinates based upon the x and y values supplied by the mouse event and then calls repaint(), which in turn calls paintComponent() as part of the rendering process.

All you need to do is alter the code in the mouse listener and the paintComponent() method to draw your rectangle instead of the simple line I used as an example.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Tabs? Why wouldn't that work?

This.
Modern browsers allow you to have more than one page open at a time. Try Firefox.

(They have push-button phones now too. No more turning that little dial! Nifty!)

humbug commented: I think this should be part of your rep :P +4
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You forgot one option on the poll:
"Hell no, that has to be the lamest thing I've heard in a good while."

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, understanding how to solve it is going to be pretty important to coding it, wouldn't you say? You need to start with some pseudocode of your approach and then start writing the Java code to carry it out. Post your code and specific questions if you have difficulties.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This should give you a start to work from. Similar, but different enough that you'll have to figure out the rectangle part.

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import javax.swing.JApplet;
import javax.swing.JPanel;

public class PaintApplet extends JApplet {

    public void init() {
        getContentPane().add(new CanvasPanel());
    }

    class CanvasPanel extends JPanel implements MouseMotionListener{
        Color backColor = Color.WHITE;
        Color foreColor = Color.BLUE;
        
        Point p0 = new Point(0,0);
        Point p1 = new Point(0,0);
        
        public CanvasPanel(){
            super();
            addMouseMotionListener(this);
        }

        @Override
        protected void paintComponent(Graphics g) {
            g.setColor(backColor);
            g.fillRect(0, 0, getWidth(), getHeight());
            g.setColor(foreColor);
            g.drawLine(p0.x, p0.y, p1.x, p1.y);
        }

        public void mouseDragged(MouseEvent e) {
            p1.x = e.getX();
            p1.y = e.getY();
            repaint();
        }

        public void mouseMoved(MouseEvent e) {
            // nothing here - just want drag operations
        }
    }
}
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Correct. The mouse event will supply the current coordinates of the mouse, which you can use to calculate your new rectangle coordinates. The paintComponent() method can then draw a rectangle with those coordinates when you call repaint().

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Use basic math to translate your values to pixel coordinates. You are just drawing on a rectangle of getHeight() and getWidth() dimensions. (Hint: the middle is just [getWidth()/2, getHeight()/2] and y' = getHeight()-y )

Or translate the graphics context to the origin you want and invert the y scale on your Graphics2D reference.

http://java.sun.com/docs/books/tutorial/2d/index.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Two options:
1) Give the program more memory with -Xmx: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html#options

2) Use less memory. That may involved using a smaller thread pool or limiting buffer sizes for file operations, etc.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Easy to do with a Swing Timer that toggles a "paint string" boolean on and off and calls repaint(). Just have your paint method check that variable before drawing the string.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, somehow you determined that those entries were duplicates. It should be easy enough to retain that information in either the object that holds your file entry data or separate data structures like lists. All you really need is to be able to correlate that information with your table rows. That becomes rather trivial if you are using your own table model, but if you are using the DefaultTableModel then you might want to store the actual file entry object in a col, perhaps the Filename column, and just have the toString() method display the name you want to see. The rest of that data is still available but not cluttering up the table with hidden columns.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, are you sure the files exist in that location? And what does file.exists() return for those files? If those are correct paths to files that do exist then the only other reason the delete would fail would be that the files are locked exclusively by another process. You are the only one who can determine that. Can you delete one of them through Explorer?

Edit: Bleh, cross-posted. This is a bit redundant with dickersonka's post.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Since you are using DefaultTableModel, use addRow() to add the row. JTable.editCellAt(int,int) to set the editing cell.

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

Code has already been provided and your unrelated question in another forum has absolutely no bearing on this poster's current issues.

dickersonka commented: The posting enforcer!!! +2
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No need to apologize, it was merely a counterpoint to consider :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Consider that it would be much more effective to work with objects that contain the data for each entry rather than arrays of individual Strings that are arbitrarily related by their positions.

A single list of those objects can easily be traversed by keeping a current index pointer.

To change the GUI fields, you have to set the new values to be shown from the object at the current index.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And how does the fact that children have been taken hunting by their elders for untold generations fit into that equation?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, which is clearly documented here in the API. Those docs are your best friend if you plan on doing anything at all in Java.