Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Very nice quotation indeed!

For the folks who believe that there is no God, please tolerate those of us that need God in our life. A simple request.

Conversely, please accept that some of us do not. Our simple request is that need be kept as a personal matter and out of our schools, laws, government, and international dealings. Simple enough from our point of view anyway, obviously not so for the majority.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The class you are trying to read and write needs to implement Serializable. This info should help: http://java.sun.com/developer/technicalArticles/Programming/serialization/

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need to print the stack trace in those catch blocks. You are throwing away all of the info that could help you track down the problem by just catching them and setting some generic text info. Add <exceptionVariable>.printStackTrace(); to each block.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Ha! You're too slow masijade!!
:)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I don't think you want to increment "i" here

for (int j = 0; j<grid[0].length; i++){

:P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Add a stack trace to the catch block for ClassNotFoundException

} catch (ClassNotFoundException notfound) {
notfound.printStackTrace();
lName.setText("Illegal Information in address book file ...");
}

If your code above compiles and does not complain "symbol" not found about the "controller" class, then it's probably a class within "controller" that is causing your problem. Not sure where that "controller" class comes from, but make sure that it's dependencies are on your class path.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Edit: nevermind... not even worth getting into...

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Not to mention that this while condition is just plain wrong

while ((line = br.readLine()) != null && !"".equals(line = br.readLine().trim()))   {
......
}

It will read two lines and test them separately. One will be tested for null and the second for an empty string. I don't think the goal is to process every other line in the file.

And it's a confusing mess to read. Try for clarity over being clever just to minimize the lines of code.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Super() invokes the parent class constructor there. It's necessary when you override a constructor in a sub-class to ensure that the functions performed by that constructor in the parent class get executed. "Super" can also be invoked in methods that are overridden. It invokes that method with that same signature on the parent class and is often used when you do not want to alter the base class method's functionality, but just extend it a bit.

The programFrame part is just setting that instance's programFrame reference to the one that is passed via the constructor. That gives the panel a reference from which to call methods on the main frame, like displayMenu().

EventQueue.invokeLater() places a task on the AWT event dispatch queue, which is the thread that handles GUI-related events. Starting the frame class this way ensures that construction of the frame occurs on that "GUI event" thread. This is recommended because Swing is essentially designed to run single-threaded and many of its operations are not thread-safe. In many(or even most cases) you wouldn't even notice a difference starting the GUI directly from main(), but in some cases you can get undesirable behavior from concurrency issues. You can read more about this here: http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html if you would like more explanation on it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Unless you were in the basement. ;)

Doh!

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you start to die in an elevator, be sure to push the Up button.

Suit yourself. I'll be pushing the down button, because that's where the paramedics would be coming from and I'll give their "saving" a first try over the other on offer.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Then read this one as well: http://en.wikipedia.org/wiki/Memory_address

Without understanding what is unclear to you, people are going to have a hard time addressing the question.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hammerhead, I'm not dismissing the fact that there are other religions. I just don't believe in them.

Why would you say something so disrespectful?
...
:-/

scru commented: you seem rather confrontational today my friend +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This really has nothing to do with Java and a quick search would have yielded an answer: http://en.wikipedia.org/wiki/32-bit_processor

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This one has really gotten too long by now. Most aren't going to review the other 142 pages if they do respond. A new thread for a new discussion is probably better.

~s.o.s~ commented: Absolutely! +21
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I think the important thing to remember is that an individuals' beliefs are his/hers to do with what (s)he wants so long as it doesnt interfere with other peoples' beliefs. This of course is an ideal, perhaps not the reality.

Yes, exactly, and therein lies the problem. It is not the reality, nor will it be for the foreseeable future.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Sure, you can't take them away from us. But that was never the issue. What you can do is get extremely disrespectful to us, as human beings, and our intelligence. Again, I ask, am I supposed to take offense from anyone without a word in my defense?

I guess that comes down to your notions of "supposed to", doesn't it? You were certainly disrespectful in your rebuff to Steve and yet you have expectations of respect in turn? The entire thing is a draw.

Words here are merely words and any offense is harmless beyond a perceived slight. From my point of view, the real offense of religion is seeing laws and wars made and supported for reasons that non-believers cannot see any possible basis for in reality. The utter illogic of that is nothing short of maddening and defies any rational comprehension.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

>Conclusion: The word "God" makes people crazy everywhere
Fixed that for you.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Unless you are referring to the part about "what kind of fool says things like that", I really don't see how you can say I belittled anyone. Furthermore, that was nothing more than an allusion to my comments about taking Josh's place (Josh called people fools simply because he disagreed with them) -- I don't actually think Steve is a fool, Ezzaral. I think he's disrespectful.

Asking "what kind of fool says things like that" after he did so is directly calling him a fool. An unintended consequence of the choice of words perhaps, but that is exactly the result.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And to say that anyone is forcing their beliefs down your throat is really exaggerating things here. Am I supposed to sit here and be offended by you and what you say about me and other Christians and our beliefs without any form of protest in order for you to be satisfied that I'm not doing so?

If you are certain in your beliefs how can they need defending? Defending from what? We can't take them away from you - we can only choose to not believe them ourselves.

Defending my beliefs and shoving them down your throat are two different things. Perhaps I should start doing the latter.

Then you would certainly find plenty of company throughout history in doing so. Lacking logic to convince, violent force has always sufficed.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Furthermore Steve. I'm not angry, I don't know how you could have jumped top that conclusion. I speak contradiction a speculation? Where? Go ahead and point it out. All I did was debunk a little bit of your speculation, but whatever.

The two positions are inherently contradictions and see the other as speculation. The atheistic viewpoint sees your "debunk" as "bunk". Posts here are not going to resolve that.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Can an atheist argue without suggesting that the one who challenges is stupid? The world may never know.

Can a believer? Your post was little different in that respect.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Okay dude. Majestic might have gone easy on you, but I will not because you have insulted me and the people who follow Christianity.

First off, how dare you belittle Christian beliefs to the likeness of "believing in the Easter Bunny"? What kind of fool says things like that? (besides Jbennet of course).

And yet you belittle him for NOT having those beliefs and call him a fool. See any problem there?

People who "believe" in the easter bunny, and by extension Santa Claus, are normally either small children or adults who don't actually believe in those things but speak of them for the sake of their children. People with full thinking capacity (and I'm not belittling anyone, just excluding small children) don't actually believe in Santa or the Easter Bunny. You know this!

So what are you getting at?

It would seem pretty obvious to me - he doesn't see how anyone with "full thinking capacity" could believe the teachings of Christianity either. Nor do I for that matter. I just can't understand it myself.

Next to your little rant about the point of the Bible: simply wrong. The Bible wasn't intended for moral value. In fact, I could tell you that there are occurrences where there are some things that we would pretty much call immoral going on. The Bible does not bother to shed light on what men think is satisfactory behavior, but focuses a great deal on what *God* thinks is satisfactory behavior, and …

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Just keep in mind where Josh's abrasiveness landed him.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Please don't post multiple threads to ask the same question.
http://www.daniweb.com/forums/thread121934.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Parsing the answer needs to occur after they have entered the answer, such as in a button handler for the "Ok" button. You are currently parsing the original value you placed in that field "Enter Answer here!".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Bleh, got back to this thread just a little too late I guess, but perhaps you will still see this post.

If you wish to organize the UI sections in a more modular and manageable way, you might consider this arrangement

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Interface extends JFrame {

    public Interface() {
        displayMenu();
        setSize(600, 500);
        setVisible(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    public void displayMenu() {
        setTitle("Mp3 database: Please select Function");
        Container pane = getContentPane();
        pane.removeAll();
        pane.add(new MenuPanel(this));

        pane.validate();
        pane.repaint();
    }

    public void addNewSong() {
        setTitle("Enter Song Info");
        Container pane = getContentPane();
        pane.removeAll();
        pane.add(new SongDataPanel(this));
        pane.validate();
        pane.repaint();
    }

    /** Main menu UI */
    private class MenuPanel extends JPanel {

        private Interface programFrame;
        private JButton newSongB, exitB, deleteSongB, playlistB, searchB;
        private NewSongButtonHandler nsHandler;
        private DeleteSongButtonHandler dsHandler;
        private PlaylistButtonHandler plHandler;
        private SearchButtonHandler sbHandler;
        private ExitButtonHandler ebHandler;

        public MenuPanel(Interface programFrame) {
            super();
            this.programFrame = programFrame;

            setLayout(new GridLayout(5, 0));

            newSongB = new JButton("Enter New Song");
            nsHandler = new NewSongButtonHandler();
            newSongB.addActionListener(nsHandler);
            add(newSongB);

            deleteSongB = new JButton("Delete Song");
            dsHandler = new DeleteSongButtonHandler();
            deleteSongB.addActionListener(dsHandler);
            add(deleteSongB);

            playlistB = new JButton("Playlist");
            plHandler = new PlaylistButtonHandler();
            playlistB.addActionListener(plHandler);
            add(playlistB);

            searchB = new JButton("Search Database");
            sbHandler = new SearchButtonHandler();
            searchB.addActionListener(sbHandler);
            add(searchB);

            exitB = new JButton("Exit");
            ebHandler = new ExitButtonHandler();
            exitB.addActionListener(ebHandler);
            add(exitB);

        }

        private class NewSongButtonHandler implements ActionListener {

            public void actionPerformed(ActionEvent e) {
                programFrame.addNewSong();
            }
        }

        private class DeleteSongButtonHandler implements ActionListener {

            public void actionPerformed(ActionEvent e) {
            }
        }

        private class PlaylistButtonHandler implements ActionListener {

            public void actionPerformed(ActionEvent e) {
            }
        }

        private class SearchButtonHandler implements ActionListener {

            public void …
peter_budo commented: Beautiful work as always +7
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Are prisons part of infrastructure? California needs lots more prisons!

They wouldn't if they stopped incarcerating for minor drug possession violations and if prison life were made much more difficult. Taxpayers already pay too much for needless or ineffective imprisonments.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, it might not be as frenzied without Josh to stir it up. I guess we'll see.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What exactly is that meant to establish? Are you seriously trying to start anything other than an argument?

Given the other 141 pages of this thread, why are you questioning this one post in particular? The entire thread is pretty much an argument. What else do you figure it could be? :P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Even the Angels in heaven don't know when the end of the world will be. I am sure man doesn't either.. :D

Ah, so they told you that? Personal phone call, letter, or did they text you? Any other wisdom from imaginary beings to relate?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Start with a JAXB tutorial: http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html

This forum is not one.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

comjisu33, based on sukatoa's response it looks like your original code was quite different and you edited it after the response. If you make changes to the code, make a new reply with those changes instead of altering the original. After your edits, sukatoa's response seems to make no sense because that code is no longer there. Please leave the integrity of the thread in place so as not to cause confusion.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"execution is stopped" isn't a lot of information to go on. You have an exception? What is it exactly? The code just never returns from that method? You're going to need to give a little bit more detail on your issue if you expect anyone to offer some advice.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No pickup recycling where I live, but it's somewhat rural. We haul it to a center ourselves. The larger city nearby does have a curbside pickup service. We have a small compost bin the back yard for use in the garden, but I'm not sure about any local large-scale composting programs.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What part is "wrong" in your estimation? Wrong is a pretty broad area. Just glancing at the smooth() method it looks like a basic 3 point moving average. Where is the issue?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You probably need to flush the Image resources. Try adding this to see if it gets rid of the cached image

ImageIcon oldIcon = (ImageIcon)jLabel3.getIcon();
oldIcon.getImage().flush();
Icon icon = new ImageIcon("graph.png");
jLabel3.setIcon(icon);

Is there a reason that it has to generate a .png instead of rendering directly to the screen?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Just curious - were you actually a game programmer somewhere? Or do you know people that have been and then left? Or do you have another source?

There is plenty of info available out on the net about the working conditions associated with professional games development. Search around a bit and you will find more than enough to give you an idea of the stress levels involved. This should get you started: http://ea-spouse.livejournal.com/

I'm sure there are great places to work developing games and I'm sure there are people who absolutely love doing it, but it's generally known for high pressure, stress, and burnout as jwenting said.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Take a look at JTree and How To Use Trees.
If you don't want to use a JTree then you'll have to decide just how you want to represent that data and how you want to interact with it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I think your trouble is actually these two lines

buttonCalc.addActionListener(this);
          buttonClear.addActionListener(this);

because you never initialize those buttons. There is nothing wrong with the line that you posted.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Just call DefaultTableModel.removeRow(int) on the TableModel. You will need to cast it to DefaultTableModel to call that method, since it is not part of the TableModel interface.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What error specifically and what have you tried to resolve it?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This tutorial might provide a starting point on the design: http://www.javacoffeebreak.com/text-adventure/index.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Check your project properties and make sure that in "Libraries" you have selected the 1.6 platform and that in "Sources" you have selected JDK 6 for "Source/Binary Format".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You would be much less stressed if you paid attention in class and started your homework before the day that it was due. This forum is not a homework completion service. Good luck with your studies.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you have a reference to the Element you can simply use the Element.setTextContent(String) method. After you have updated all of the DOM elements as needed, just write it back to a file: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

i am preparing for placement..please help me to become expert in c,c++java...by tutorials

Sorry to burst your bubble, but you are not going to become an expert in any of those through tutorials.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Start with a simple tutorial on JTable: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

(These examples that you keep asking for are incredibly easy to locate with a very simple search. You should take a little initiative to find them before asking others to give them to you.)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Sorry, not going to do your homework assignment for you.

If you want to post what code you do have done and ask specific questions, someone may be able to provide some advice.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Also, with the basic structure that Peter showed above, if your game classes extend JPanel (or a similar container class), you can swap that game panel in to replace your menu panel and then swap it back if they exit the game.