473,466 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Java GUI problem

5 New Member
Hi,

I have built a GUI with java swing on linux env.Within that there is a small rectangular area of green color. The problem is, any other linux window coming infront of that very rect. area , is changing its color.Evanif any other window is covering a part of it, is changing the color of that part of that very area.

Can someone pls help me out to figure out where the problem lies along with possible solution.

babai
Oct 24 '07 #1
5 1178
r035198x
13,262 MVP
Hi,

I have built a GUI with java swing on linux env.Within that there is a small rectangular area of green color. The problem is, any other linux window coming infront of that very rect. area , is changing its color.Evanif any other window is covering a part of it, is changing the color of that part of that very area.

Can someone pls help me out to figure out where the problem lies along with possible solution.

babai
What is that small rectangular area of green color? A JFrame?
Can we see the code you used?
Oct 24 '07 #2
babai678
5 New Member
What is that small rectangular area of green color? A JFrame?
Can we see the code you used?

NO, its a JPanel.
The code associated with that is quite big and scattered here and there.So , don't really know how to give it here.
Oct 24 '07 #3
JosAH
11,448 Recognized Expert MVP
NO, its a JPanel.
The code associated with that is quite big and scattered here and there.So , don't really know how to give it here.
Do you perform some sort of calculations in the paintComponent method of the
JPanel that changes a Color value?

kind regards,

Jos
Oct 24 '07 #4
babai678
5 New Member
Do you perform some sort of calculations in the paintComponent method of the
JPanel that changes a Color value?

kind regards,

Jos
In the paintComponent ( ) calculation are made only regarding the size of the area.
Actually, depending on a particular variable the color is determined and then only the paintComponent( ) is called.
Oct 25 '07 #5
JosAH
11,448 Recognized Expert MVP
In the paintComponent ( ) calculation are made only regarding the size of the area.
Actually, depending on a particular variable the color is determined and then only the paintComponent( ) is called.
Is that "depending on a particular variable the color is determined" calculation
performed in the "paint()" method?

Colors are not supposed to change "automagically" some piece of code is
responsible for the change. The behaviour you described seems to be performed
initiated from the AWT thread.

kind regards,

Jos
Oct 25 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Steven Green | last post by:
I have a java app at work I used when I had Windows 98 and never had a problem. I did a clean install of Windows XP and of course Java was not included. I went to Sun, download Java 2 Runtime...
2
by: Patrick | last post by:
I'm using Jakarta-POI to create a huge Excel spreadsheet. I get the error below when the spreadsheet grows to a large size. It seems to have something to do with the number of "cell" objects that I...
13
by: BlackHawke | last post by:
Our program, game program Andromeda Online (www.andromedaonline.net) uses two programs- one to play the game, another to patch the game as updates come out. Players actually launch the updater...
133
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
2
by: Tim Murray | last post by:
First of all, I don't know much about Java, even its naming and version numbering nomenclature, and second, if there is a better group to ask this in, please let me know. System is Mac with...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
6
by: Rhino | last post by:
I'm trying to debug a simple Java UDF written in the DB2General style within Eclipse. I'm getting a java.lang.UnsatisfiedLinkError when I execute the set() method in the UDF. I know that the...
14
by: mlw | last post by:
Do not take anything about this, it is not a flame or troll, while I'm not new to Java I favor C++. However, I may need to use it in a contract position, and am concerned that the restrictions it...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.