Julie de Wet

Greenhorn
+ Follow
since Apr 04, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Julie de Wet

Hi

I have a gui with a picture as background, and transparent labels. I want to set the background of the labels so that they are only partially transparent, so that my background is less obtrusive where I have text.

As far as I can see a label can either be opaque or transparent and not some inbetween value.

I tried using a gif which was partially transparent as background for the label and setting opaque to false, but that didn't work

Does anyone else know how, or have any suggestions

Thanx
16 years ago
Hi

Can anyone recommend a good visual editor ? (preferably free)

thanks
16 years ago

The sum of the second series converges to 2
[ April 18, 2004: Message edited by: Julie de Wet ]
16 years ago

does nothing - there shouldn't be a semicolon after for(...)
16 years ago
try and replace

with

[ April 18, 2004: Message edited by: Julie de Wet ]
16 years ago
It was trivial. It was the hyphon.
This is probably a trivial problem - but I'm stuck
SELECT MA-nr, Fornavn FROM Medarbejder WHERE MA-nr = '0200695';
I make a PreparedStatement with the above sql, when I call executeQuery I get the following exception:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access-driver] Der er for f� parametre. Der var ventet 2
i.e. too few parameters - 2 were expected.
What could be possible/probable causes ?
Have you tried using -1 * angle ? i.e. negative angles.
16 years ago

You could also choose to have cans, lwork and bksread as instance variables in the superclass Rewards with setter methods, then calculate wouldn't have to have them as paramteres.
In the code you wrote points wasn't used even though you sent it in as a parameter to setPoints, you then overwrote the value it contained with 0, as you sat the PARAMETER points equal to cans * etc. but these variables are all 0. You never sat the instance variable points equal to anything i.e. this.points, so even if cans, etc, had contained values other than 0, when you called calculate you still would have received 0 as a result.
The toString method in each class i unneccessary as it just calls the super, this will be done anyway, if you don't provide a toString method.
Finally when you write new...then it has to be followed by a class name, i.e. Boy or Girl. Rewards Boy doesn't make any sense. A boy object is also a Rewards object, because Boy is a subclass of Rewards.
16 years ago
You haven't importet java.io.IOException, so the compiler doesn't recognise IOException.
16 years ago
private final ArrayList arrayList = new ArrayList();
...
JList list = new JList();
arrayList.add(...) // add elements - if you have a Collection use addAll

list.setModel(new AbstractListModel()
{
public int getSize()
{
return arrayList.size();
}

public Object getElementAt(int i)
{
return arrayList.get(i);
}
});
list.addListSelectionListener(new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
if(!list.isSelectionEmpty())
{
arrayList.remove(...); // maybe remove(list.getSelectedIndex());
list.clearSelection();
list.repaint();
}
}
});
As to JFrame it is part of the javax.swing package which you import...
16 years ago
I create a JPopupMenu - menu, add two JMenuItems - a and b, and then set b to be selected i.e. menu.setSelected(b), but when I call menu.show(...), a is always shown as being selected, even though when I call menu.getSelectionModel.getSelectedIndex() it returns 1 !!
What am I doing wrong ?
16 years ago
My two cents worth
Well obviously the terminating condition is when the node is a leaf and doesn't have any children.
ArrayList (??) nodes; // just as an example
printChildren(Node parent)
{
for(int i = 0; i != nodes.size(); i++)
{
Node node = (Node)nodes.get(i);
if(node.parent_id.equals(parent.node_id))
{
System.out.println(node.node_id);
printChildren(node);
}
}
}
16 years ago
Again just a guess... But as far as I understand it, your problem could be due to one of two things...
1. You haven't set the codebase property correctly - forgotten the trailing /
2. I quote "Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry, either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.
If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object."
16 years ago
My guess is that in the parameter list of the method, the type of the object is given as being Object, and not as being that of your class which implements Serializable... So even if the instance you pass in is Serializable, if you send it as an Object, it will throw an Exception, because in general Objects aren't Serializable...
16 years ago