comp.lang.java.gui
  Home FAQ Contact Sign in
comp.lang.java.gui only
 
Advanced search
June 2008
motuwethfrsasuw
      1 22
2345678 23
9101112131415 24
16171819202122 25
23242526272829 26
30       27
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.java.gui Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Freelance Projects for Java Programmers         


Author: Jaik
Date: Jun 30, 2008 14:56

Get access to a large number of freelance projects in Java and J2EE.
Join one of the largest databases of freelance projects. New and
exciting projects added every day.

Join For Free Today.
http://www.getafreelancer.com/affiliates/jaikjoel/
8 Comments
  java.awt.image.RescaleOp.filter() causes VM crash: EXCEPTION_ACCESS_VIOLATION         


Author: Bob Wobbler
Date: Jun 28, 2008 14:07

I'm trying to scale a BufferedImage to fit it into a JLabel. First I
calculate the correct scale factor, the create the operation and a new
BufferedImage to copy the scaled image to.

But once my code reaches the RescaleOp's filter Operation the virtual
machine crashes. I couldn't really find any posts on this problem,
still I hope someone here might have solved this problem before.

Btw the method BufferedImage.getScaledInstance works, the only problem
is that it's result is an Image, but I need a BufferedImage because I
have to do some further processing with the data, but can't read any
pixels from the Image object this operation returns. So an alternative
solution would be to convert the Image to a BufferedImage - only
problem is that I don't know how to do that either.

Here's the code:

// read image
BufferedImage originalImage = ImageIO.read(imageFile);
Show full article (2.25Kb)
4 Comments
  teste         


Author: Paulo
Date: Jun 28, 2008 07:11

I´m here
4 Comments
  KeyEventDispatcher receive a consumed event         


Author: Jack
Date: Jun 27, 2008 07:48

Hi,
in teh flow of my java program, i show a message dialog, which i close
with "ESCAPE" key type, but the key also close my JDialog subclass. What
is the reason ?

A Simplified version of the code is right below:

// the message
JOptionPane.showMessageDialog(frame, ...);

// i create the dialog
JDialog d = new MyJDialog(frame, true) {
{
super(frame, true);

keyEventDispatcher = new KeyEventDispatcher() {
private boolean done = false;
Show full article (1.15Kb)
no comments
  (newbie) How to get the UI to update right away         


Author: mrstephengross
Date: Jun 27, 2008 07:30

So here's my next swing question: I've got a combo box with an action
listener. When you make a selection from the combo box, the action
listener fires off and does a bunch of stuff that takes a few seconds
to execute.

However! While the action listener is executing, the combo box does
NOT collapse. That is, I would expect it to first collapse (with the
new selection highlighted) and THEN fully executed the action
listener's code.

Is there a way to do this? I've been trying out various
implementations of the action listener to get it work, such as:

public void actionPerformed(ActionEvent e)
{ comboBox.setPopupVisible(false); /* do other stuff */; }
public void actionPerformed(ActionEvent e) { comboBox.validate(); /
* do other stuff */; }
public void actionPerformed(ActionEvent e)
{ applicationFrame.validate(); /* do other stuff */; }

But nothing seems to work. I've even tried the:
SwingUtilities.invokeLater(new Runnable() { comboBox.validate(); /
*...*/ });
Show full article (1.10Kb)
4 Comments
  Serial Port Communications with GUI         


Author: HulkingNightCrawler
Date: Jun 26, 2008 13:08

I am trying to read data off a serial port and then display the data
in a GUI and I cannot seem to access the GUI in order to do this. For
some reason whenever I try to append to the text box the program seems
to stall out and I cannot figure out why? Any help would be
appreciated, thanks!!

import java.io.*;
import java.util.*;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import gnu.io.*;
Show full article (3.83Kb)
2 Comments
  Weird window close behavior         


Author: mrstephengross
Date: Jun 26, 2008 12:27

I have a short swing program (see below) that dislpays a HelloWorld
frame. It compiles fine, but runtime behavior is a bit awkward. To
wit:

(1) I run the program. It shows a nice 100x100 empty panel. I move the
mouse directly over the CLOSE button (the top-right "X") WITHOUT
moving over the content pane at all. I click the close button. The
window closes.

(2) I run the program. It shows a nice 100x100 empty panel. I move the
mouse first over the content pane, THEN over the CLOSE button and
click it. The window does NOT close.

This is indeed weird behavior. I wonder if it has anything to do with
my system configuration. I am running:
OS: Ubuntu 6
Javac: gcj-4.2 (GCC) 4.3.2 (Ubuntu 4.2.3-2ubuntu6)
java: "1.5.0" gij (GNU libgcj) version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)

Any ideas?

=== CODE FOLLOWS ===
import javax.swing.JFrame;

public class HelloWorldFrame {
Show full article (1.14Kb)
20 Comments
  Transparent JDesktopPane with intransparent JInternalFrames?         


Author: Jan Luehr
Date: Jun 25, 2008 04:44

Hello,

I was wondering: If a JDekstopPane is made transparent
eg:
JFrame jf = new JFrame("Frame");
jf.getContentPane().add(new JDesktopPane());
AWTUtilities.setWindowOpacity(jf, 0.75f);

Is it possible to have intranparent (or less transparent)
JInternalFrames? AWTUtilities.setWindowOpacity only applies to Windows...

Imho this could be difficult, 'cause SwingCompnents are
lightweight-Components and a DesktopPane / InternalFrame does not have a
corresponding awt class)

Is there a way to not draw the JDesktopPane's backround (via some paint
(Graphics g) magic - for instance) and use an underlaying JWindow for
the opacity-effect? Furthermore, how can I prevent painting the Pane's
background?

Thanks in advance,
Keep smiling
yanosz
no comments
  Problem faced while using TinyLnF         


Author: Chanchal
Date: Jun 24, 2008 02:28

Hi,

I'm using TinyLnF package (http://www.muntjak.de/hans/java/tinylaf/
index.html) for look and feel in my swing application. I'm facing a
problem there. To sort tables i'm using TableRowSorter


TableRowSorter sorter = new
TableRowSorter(jtbResources.getModel());
jtbResources.setRowSorter(sorter);


But when the column header is clicked, the up or down arrows which
indicates the wort order is not displayed. Kindly advice on how they
can be displayed.

Also, is there any way to use some other images in place of those up
or down arrows?

Thanks in advance

Chanchal
5 Comments
  Re: join the membership,optimize my blog:         


Author: Lew
Date: Jun 23, 2008 16:37

MR.sam wrote:
> dear
> I agree to join the membership.
> I wante to optimize my blog:
> title my blog :yeast.
> http://bestyeast-sam.blogspam.scam
> How?
> Tell me how increase visitors to my blog.

Start by not multi-posting spam to unrelated newsgroups. All that does is
piss off the smart people, leaving only stupid people to come to your site.

Which is fitting, I suppose.
> I invite you to consult me to optimize my blog and write in it.

OK - pay me $300 / hour U.S., and I'll gladly help.
> are you agree?, send me.
> sincerely
> sameeh i.saad

Christ, as illiterate as your multi-posted spam is, you think we'd be
interested in inflicting more of your crap on ourselves?

Hardly likely.
Show full article (0.76Kb)
no comments
1 2 3 4 5