jwenting 1,905 duckman Team Colleague

Without knowing the entire structure of your blocks and the errors you're getting it's impossible to tell what you're doing wrong.
Most likely your blocks aren't properly nested though, causing some checked exceptions to not be caught.

jwenting 1,905 duckman Team Colleague

Nothing wrong. Delphi knows about client area coordinates, Windows does not.
So you will need to override those handlers to do the translation between the two yourself.

jwenting 1,905 duckman Team Colleague

1) the result of your comparison is thrown away as soon as you exit your findSmallest method, so you might as well not have run that method in the first place.
2) Java doesn't have operator overloading so you can't use mathematical operators on class instances. Your class is obviously longer than the bit you posted and the error in another part you didn't show.

jwenting 1,905 duckman Team Colleague

no, create the screen only once you know which screen features you need, so after you have the stream.

jwenting 1,905 duckman Team Colleague

try the drive on another computer (or more than one). If it doesn't work there it's the drive...
Simple process of elimination.

jwenting 1,905 duckman Team Colleague

create the user interface on the fly depending on what features the stream supports.

jwenting 1,905 duckman Team Colleague

is your appserver running?
and if it is, is there a firewall in place that may block it?

jwenting 1,905 duckman Team Colleague

architecture is a very broad thing. You are supposed to talk about what, the general architecture of the language?
Or architecting software to be written in Java?

Limit yourself to a small part of the language. The architecture of the Collections framework for example, or Swing.

jwenting 1,905 duckman Team Colleague

You're a year late and you haven't even started yet?
I want to speak to the teacher who doesn't give an automatic failure when an assignment is overdue by that much to a (supposed) student too lazy to even try to complete it on its own.

jwenting 1,905 duckman Team Colleague

You can always turn a File into a URL, so create a File and return the result of the toURl method.

jwenting 1,905 duckman Team Colleague

I've an HP now, but it's getting long in the tooth (bought it in 1997).
As many of my prints tend to be very heavy in one colour or another their combined ink cartridges are also very expensive for me.
I often run out of for example cyan while the other colours are still more than half full, not very economical.

And I'd gotten some excellent referrals for Epson's R1800 and R2400 printers which use the same ink to print on larger paper.

But I'm looking at HP too if they have a quality photoprinter with separate tanks, just haven't found one yet...

jwenting 1,905 duckman Team Colleague

You might try some pure alcohol, it might work.
Sold in better pharmacies for sterilising wounds and stuff.

Or chemical solvents, but those tend to be hard to get and often damage the plastic as well.

jwenting 1,905 duckman Team Colleague

buy a new printer...
With lowend models that's almost always cheaper than getting them repaired.

And that's one part of the reason noone will buy your printer. Resale value after repairs is just about zero, and repairs are expensive, so why should anyone give you any money for it?
In fact, you'd likely have to pay to leave it at a store because it will cost them money to get rid of it.

jwenting 1,905 duckman Team Colleague

The entire thing you have there is not a valid Java statement.
What are you trying to achieve anyway? The variable would (were this to compile) be lost anyway as soon as it completed.

jwenting 1,905 duckman Team Colleague

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

I've more if you want them ;)

jwenting 1,905 duckman Team Colleague

This has nothing to do with JSPs, better find a forum specific to Crystal Reports.

jwenting 1,905 duckman Team Colleague

Did you compile it?
Did you put the compiled classes (and package structure) in the correct place within your web application?
Did you create the correct entries in your web.xml?

jwenting 1,905 duckman Team Colleague

Make sure the image is reachable through an http request to your web application server (or elsewhere).

jwenting 1,905 duckman Team Colleague

http://www.daniweb.com/techtalkforums/announcement9-2.html

Think for yourself and others will think with you.
Fail to think at all and others will pass you by.

jwenting 1,905 duckman Team Colleague

For that you'll need to find an old copy of MS QuickBASIC 7 somewhere (4.5 might work depending on the language features you used).
That can compile your BASIC programs into DOS 16 bit executables.

And no, noone's going to point you to a download as it's not free software. It's a commercial product that's no longer be sold, but it's still protected under copyright and cannot be distributed.

jwenting 1,905 duckman Team Colleague

Or rather in your physical disk manager?
Sometimes Windows tries to assign a drive name that already exists as a network drive and you have to change the drive name by hand.
Small glitch, happens only if the first network drive has a name which is the next letter after the last physical drive.

jwenting 1,905 duckman Team Colleague

GWBasic is not a compiled language, neither is QBasic.

jwenting 1,905 duckman Team Colleague

For you there should be no difference in the WHAT of the device on either end.
As long as you know the protocol and have a way of getting the datastream it's transparent.

jwenting 1,905 duckman Team Colleague

Now for some good news...
Dealing with Sandisk tech support I had a response and an address for a replacement stickdrive within hours.
After my first email to that address to make arrangements got lost (for which they apologised) I had a replacement drive in the mail in under a week from the time I got the shipping address.
How's that for service?

And my experiences with most other companies I've dealt with over the years (Microsoft, Logitech, Maxtor, Iiyama, Sun, Corel, and others) has been very similar.

About my only bad experience has been with Philips, and that was more the extremely slow (glacial is the word) way they work than the end result (took them only half a year to exchange a broken DVD writer under warranty).

jwenting 1,905 duckman Team Colleague

If you just read "consumer reviews" to determine what to buy you'll never buy anything as the only people who usually voice their opinions are those who are unhappy...

I know several people who have Dell systems, and all are quite happy with them.

jwenting 1,905 duckman Team Colleague

You'll need to structure your build (and code) in such a way that your dependencies are minimised or (if possible) eliminated.

So you get a target compileABC depending on compileA, compileB, and compileC where neither depends on any of the others.
Another target compileCDE would depend on compileC, compileD, and compileE.

You will then structure your source directories so that parts A-E don't overlap (in this example C is likely some common package shared by the others so you would have your IDE set up to link to it in the other projects).

jwenting 1,905 duckman Team Colleague

I'm looking to (within a few months hopefully) buy me a (semi)professional photoprinter.

At the moment the Epson R800 looks very promising but I'm a bit wary of spending some €350 on a device I've never seen in action and noone around here has it in stock to demo.

Does anyone here have experience with this device (or similar current models in the same class)?

jwenting 1,905 duckman Team Colleague

Create supertargets building only those parts of the application you want to include.
So for example (from one of my buildfiles):

<target depends="cleanup" name="clean"/>
  <target name="precompile"/>
  <target depends="javacompile" name="compile"/>
  <target name="postcompile"/>
  <target depends="archive,javadoc,resource" name="package"/>
  <target name="deploy"/>
  <target depends="precompile,compile,test,postcompile,package,deploy" name="make"/>
  <target depends="clean,make" name="rebuild"/

make sure every single supertarget does a clean build to make sure nothing is included that wasn't ordered.

jwenting 1,905 duckman Team Colleague

If you'd posted a normal topic line someone'd likely have come along already.
As it is I'm disinclined to even try, I only dropped in to kill some time ;)

You state yourself there are no errors, so I wonder what the problem is?

jwenting 1,905 duckman Team Colleague

Whether you like it or not, Hitler funded (for whatever reason) a great many scientific programs.
Those technologies may have come about at a later date anyway (such is the nature of science) but he certainly did speed things up.
WW2 also caused the US, UK, Japanese, and Soviet (among others) governments to invest massively in science and technology, causing more great advancements.

Noone denies that Hitler caused many very bad things to happen (though I postulated many of those things too would have happened anyway, though maybe in another way and at a later date, such is history), but the positive things he also did are often (and you are an excellent example of that attitude) censored out because of those bad things (an attitude of "he did these bad things THEREFORE he can't have done anything good).

jwenting 1,905 duckman Team Colleague

any tutorial on Javascript will tell you all about loops.
And always remember that Javascript is not Java.

jwenting 1,905 duckman Team Colleague

Your teacher probably never worked in the real world and learned Java from a very old book and never kept that knowledge up to date.
Vector predates List by several years, it's no longer recommended for use.

For performance I once did a small test.
Programmed a servlet that did several hundred inserts into a Vector (and then read them out again).
Timed that and repeated with an ArrayList.
The version using the ArrayList (and otherwise identical) was more than 10 times faster.

jwenting 1,905 duckman Team Colleague

I have to second Ubuntu.
First ever distro for me that installed without months of having to constantly tweak things only to end up with a system that still worked only partially.

Only downside is that it takes up a lot of diskspace, the 4GB disk in my laptop is almost full of it.
But then, the same is true for most if not all other distros (and often to greater extents)...

jwenting 1,905 duckman Team Colleague

all multiposting does is piss off your readers, it makes YOU look bad.

Alienware are a quality company building quality products. Seems they did their job in helping you, so where's the complaint?

I once had a Toshiba laptop that broke down. That took Toshiba 2 months to fix. Turned out they needed to wait for a new component to be designed, manufactured, and shipped in from Japan because the problem was caused by a design flaw in the motherboard.

If I'd taken out the extended warranty plan with equipment replacement options I'd have had another machine to use while they were waiting for my new mobo to arrive.
As I had been cheap (like you, not ensuring you had a backup to continue working if and when your main machine failed) I was without a laptop for 2 months.

2 failures in short order may be more than average (and in fact most machines will never break) but it can happen.
It's called random chance and can't be predicted. With each component sitting on a bell curve indicating its chance of failure at any point in time, you just hit the jackpot with 2 of them failing nearly simultaneously.
Someone else hit the lucky spot and will have his components work to well beyond their designed life, that's statistics for you.

Now if you'd purchased several hundred machines from the same type and brand and they all had the same problem …

jwenting 1,905 duckman Team Colleague

advocating piracy, idiocy, or plain cluelessness ? :rolleyes: :rolleyes: :rolleyes:

jwenting 1,905 duckman Team Colleague

Preferably use List (especially ArrayList) instead of Vector to avoid the overhead caused by all the synchronization going on in Vector.
When and if you need that, you'll know it (and know the preferred alternatives in those cases as well).

jwenting 1,905 duckman Team Colleague

What are you trying to accomplish?
I don't have Netbeans installed here (don't like the product, too slow and cumbersome) but you should be able to add the requires jar to compile them like any other.
If you want to have Netbeans generate a web application it should automatically do that for you and set up your web.xml and server environment as well (if Netbeans supports such options, I think it does by now).

jwenting 1,905 duckman Team Colleague

Another option which I use (as I need read/write access at any point in a file with a fixed record format) is RandomAccessFile.

That yields a read method like this:

public synchronized String[] readRecord(int recordId) throws
        RecordNotFoundException {
        String[] record = new String[6];

        byte[] buffer = new byte[RECORD_LENGTH];
        int flag = 0;
        int bytesread = 0;
        Logger.getLogger("suncertify.server.bs").entering(this.getClass().
            getName(), "readRecord");

        // try to move the pointer to the start of the requested record.
        // if this fails the record doesn't exist.
        try {
            datafile.seek(recordId * (RECORD_LENGTH + DELETE_FLAG_SIZE) +
                          firstRecordOffset);
        } catch (IOException ex) {
            throw new RecordNotFoundException("Record " + recordId +
                                              " does not exist");
        }
        try {
            // read the flag to check whether the record is marked deleted
            flag = datafile.readUnsignedShort();
            if (flag == DELETE_FLAG) {
                throw new RecordNotFoundException("Record " + recordId +
                                                  " has been deleted");
            }
            // read the record
            bytesread = datafile.read(buffer);
        } catch (IOException ex) {
            throw new DatabaseException("Error reading record " + recordId, ex);
        }
        StringBuilder buf = new StringBuilder(bytesread);
        for (int k = 0; k < bytesread; k++) {
            buf.append((char)buffer[k]);
        }

        record[0] = buf.substring(0, 32);
        record[1] = buf.substring(32, 96);
        record[2] = buf.substring(96, 160);
        record[3] = (new Integer(buf.substring(160, 166).trim())).toString();
        record[4] = buf.substring(166, 174);
        record[5] = (new Integer(buf.substring(174).trim())).toString();

        Logger.getLogger("suncertify.server.bs").finer(buf.toString());
        Logger.getLogger("suncertify.server.bs").exiting(this.getClass().
            getName(), "readRecord");
        return record;
    }
jwenting 1,905 duckman Team Colleague

When reading and writing binary files (which almost all files with a .dat extension are. There are thousands of different formats of course, dat is just short for data after all) don't use Readers and Writers.
Things like ByteArrayInputStream are your friends.

jwenting 1,905 duckman Team Colleague

That's not Java, but JavaScript. Post it in the appropriate forum.

jwenting 1,905 duckman Team Colleague

And DO NOT start partying instead of studying like so many people do...

jwenting 1,905 duckman Team Colleague

Stop shouting.

v.2005 is out or should be out shortly. .NET has been a core part of MSVS for 4 years now, you're way way outdated.

jwenting 1,905 duckman Team Colleague

A JPanel is always part of something else, usually either another JPanel, a JDialog, or a JFrame.

So you'd get a custom JDialog like this:

class RecordDetails extends JDialog {
    private JTextField customerNumber = new JTextField();
    private JButton okButton = new JButton();
    boolean cancelStatus = true;
    private SubcontractorDisplay details;
    private String customerId;
    private boolean readonly;

    public RecordDetails(Frame owner, Subcontractor record) {
        this(owner, record, true);
    }

    public RecordDetails(Frame owner, Subcontractor record, boolean readonly) {
        this(owner, "Subcontractor information", true);
        this.readonly = readonly;
        setData(record);
    }

    public RecordDetails(Frame owner, String title, boolean modal) {
        super(owner, title, modal);
        FlowLayout buttonLayout = new FlowLayout();
        JPanel screen = new JPanel();
        BorderLayout screenLayout = new BorderLayout();
        JButton cancelButton = new JButton();
        details = new SubcontractorDisplay();
        JPanel buttons = new JPanel();
        JPanel customerData = new JPanel();
        FlowLayout flowLayout1 = new FlowLayout();
        Box form = Box.createVerticalBox();
        Box booking = Box.createVerticalBox();
        JLabel customerLabel = new JLabel("Book for customer");
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        screen.setLayout(screenLayout);
        customerLabel.setDisplayedMnemonic('B');
        customerLabel.setLabelFor(customerNumber);
        customerNumber.setToolTipText(
            "Customer number of the customer who wants to book this subcontractor");
        customerNumber.setColumns(10);
        cancelButton.setToolTipText(
            "Close this dialog without booking the subcontractor");
        cancelButton.setMnemonic('C');
        cancelButton.setText("Cancel");
        cancelButton.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                cancelOperation();
            }
        });
        okButton.setToolTipText(
            "Reserve the selected subcontractor for the indicated customer");
        okButton.setMnemonic('O');
        okButton.setText("OK");
        okButton.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                confirmOperation();
            }
        });
        buttons.setLayout(buttonLayout);
        buttonLayout.setAlignment(FlowLayout.RIGHT);
        this.setDefaultCloseOperation(javax.swing.WindowConstants.
                                      HIDE_ON_CLOSE);
        this.setModal(modal);
        this.setResizable(false);
        customerData.setLayout(flowLayout1);
        getContentPane().add(screen);
        screen.add(form, java.awt.BorderLayout.CENTER);
        form.add(details);
        form.add(Box.createVerticalStrut(15));
        form.add(booking);
        booking.add(customerData);
        booking.add(buttons);
        buttons.add(okButton);
        buttons.add(cancelButton);
        customerData.add(customerLabel);
        customerData.add(customerNumber);
        pack();
    }
    private void cancelOperation() {
        Logger.getLogger("suncertify.client").entering(this.getClass().getName(),
            "cancelOperation");
        cancelStatus = true;
        if (customerId == null) {
            customerId = "";
        }
        this.setVisible(false);
        Logger.getLogger("suncertify.client").exiting(this.getClass().getName(), …
jwenting 1,905 duckman Team Colleague

Since the static method will always be called on the class instead of the instance you might get a tiny performance boost by using it like that, but most likely the compiler will optimise it that way for you.

jwenting 1,905 duckman Team Colleague

When you call setVisible(true) on a JFrame all other threads except the one handling that JFrame block until the JFrame has been set to invisible.
So your getText method never gets called.

You're also not creating a custom dialog. Override JDialog.

jwenting 1,905 duckman Team Colleague

What you noticed with Java was the startup time of the JVM which adds to application load time.
With an application that runs for more than a few seconds that's a trivial difference.

Of course you need to program differently as well. While the syntax may LOOK the same it isn't (Java syntax is actually closer to Object Pascal than C++) and the paradigms to use are quite different as well.

jwenting 1,905 duckman Team Colleague

The idea that Java is "much slower than C++" is largely a myth.
Sure, it once used to be slower, but no more.

For C++ GUIs (I guess you're working on Win32 platform only given what you already mentioned for options) there's another option to consider and that's VCL.
It's the standard GUI library for Borland C++ Builder which is included in the brand new Delphi Studio 2006 (to be released later this month) as well.
A breeze to work with, and far more consistent than is MFC.

I've used VCL extensively in the past under Delphi (how's that for commonality, one library under several languages) and it's very nice indeed.
Far easier than Windows API programming in C and C++ (which I've done) or MFC (which I've looked into but never done seriously, too convoluted).

jwenting 1,905 duckman Team Colleague

Hi,

It seems like it still doesn't work. All the buttons somehow become disabled after I click connect and they both connect.

that should tell you a lot of what's happening.
Ever heard of multithreading? You're going to need it if you don't want your application to just block waiting for network traffic to process (which will never arrive because your application on the other end is also blocking while waiting for input).

Combine that with Kate's excellent advise and you should be on your way to the nearest O'Reilly book dealer to get yourself their excellent Java Threads and Java Network Programming books in the latest editions ;)

jwenting 1,905 duckman Team Colleague

And don't forget that returning a value from a void method will result in a compiler error in Java (unlike C).

jwenting 1,905 duckman Team Colleague

Absolute positioning is wrong. It's there for emergency use but defeats the very purpose of using a platform independent user interface library.