Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Patrik Nilsson

Ranch Hand
+ Follow
since Oct 05, 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 Patrik Nilsson

I have the same question 1 year later
Is there any support in JAVA to find out company name and top domain from an email address without hardcoding the .co.uk, com.au, com.tw etc.




11 years ago
Well it's not really a dialog and I don't want to have it modal I want a Glasspane.
The glasspane works fine but it is still possible to "tab" behind it.
11 years ago
I have that already, I thought that should work that's why I am confused.

It is really hard to put some meaningful code exampel here so I am looking for a general tip what could be wrong but maybe that's too hard to guesss without some code.

Here is a part of my code at least:

11 years ago
Hi,

I am having a problem that I hope someone can help me with.

I have a JTable with products and wants to select the last chosen product when I get back to the page containing the table.
To select the productobject I have created my own renderer that draws a border around the product when it is selected.

I use aProductTable.changeSelection(vRow, vCol, false, false); and it scrolls to the right position but it never draws it as selected(with a border).
If I add a sleep(1) before changing selection it draws the border so it seems to have something to do with the table not being fully painted yet or something similar.

I check that I draw in the EDT.

Any help greatly appreciated
11 years ago
Ok I might have to do that.

But what I want to accomplish is that the user should not be able to click on anything behind the dialog showing.
This is normally done by using a Glasspane, but maybe there are other solutions?
11 years ago
Nobody knows?

Or is the question hard to understand?
11 years ago
I have a glasspane that I want to intercept all mouse and input events.

I have tried to impments empty listeners like:

addMouseMotionListener(new MouseMotionAdapter()
{
});
addMouseListener(new MouseAdapter()
{
});
addKeyListener(new KeyAdapter()
{
});

To be able to intercept Keyboardevents it's necessary to request focus on the glasspane
addComponentListener(new ComponentAdapter()
{
@Override
public void componentShown(ComponentEvent pE)
{
requestFocusInWindow();
}
});
and this works fine but if I use te Tab Key I can still get to the component behind the glasspane.
I have then used setFocusTraversalKeysEnabled(false); for the glasspane and this works a little bit better but if I select something in a dialog on top of the glasspane I can still tab to the compoent behind the glasspane.

Any ideas?


11 years ago
I would like to have a JRadioButton with an icon but when I create this I only get the Icon, there is no circle to check.

JRadioButton myButton = new JRadioButton(myIcon, true);

The icon is a radiobutton but it is hard to see if it is selected or not.

Is this the way it should be and if so is there a good solution to solve this to get the circle next to the image?

I thought about adding one radioButton and one label with the icon next to each other but is this really the best way to solve the problem???

JRadioButton myButton = new JRadioButton("");
JLabel myLabel = new JLabel();
myLabel.setIcon(aImageIconUnSelectedAll);
11 years ago
I found a good? way to do this myself by using FormText.

FormText vForm = new FormText(pParentComposite, 0);
vForm.setText(vText, true, false);

Just remember that the text must be wellformed xml with <form> as root element.

<form><p>This is where the real message should be with first link <a href='/myLink.html'>Link1</a> </p></form>

Have a look at FormText
11 years ago
Does anyone know if there is a way to format normal text to HTML in SWT.

What I am trying to achieve is that I want to have a link in the text but I can't use the HyperlinkClass since the text will need to be translated.
11 years ago
Hi,
I am runing my webapp in Tomcat 5.0.28 and would like to use <c:forEach> to iterate over a collection.
I have added jstl.jar in my WEB-INF/lib and added
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>in my JSP.

When I run it I get an exception org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

Is there anything else I need to do?
13 years ago
JSP
IBM has extended the retirementdate to 30 June 2007 so you still have plenty of time.

http://www-03.ibm.com/certify/news/20061215b.shtml
I received it the same day as you. I ordered a hard copy instead.

Feels good we managed to get our ICED before it expired, now we just have to go out and use our new knowledge and work on all those EJB2 projects....=)
Don't buy the whizlabs, the qusestions there are very different from the real exam.
Do the magnetmock exams instead.

It will be tough if you don't know RUP or any Design pattern but anything is possible! =)
It is absolutely possible if you have some experience!
RUP is big part of the exam, as is GRASP. Don't study too much detailed on designpatterns, I think you can skip them completely if you have some exeperience.
Do the magnet mock exams, they are very similar to the real thing.