473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Repainting a AWT Button

Is there a way to repaint an AWT Button while it is not pressed. I am trying
to implement a custom behaviour for a Button. I implement a mouse listener
and I want to repaint the button when I click the right mouse button. I have
tried all methods sych as paint, repaint, update but they all seem to fail.
The button is repainted only when I press it, (when I press the left mouse
button).

Thaks in advance
Tilemachos
Jul 17 '05 #1
1 2294
did you try this ?

b.setVisible(false);
b.setVisible(true);
On Thu, 11 Sep 2003 21:09:23 +0300, java <ti*****@hotmail.com> wrote:
Is there a way to repaint an AWT Button while it is not pressed. I am
trying
to implement a custom behaviour for a Button. I implement a mouse
listener
and I want to repaint the button when I click the right mouse button. I
have
tried all methods sych as paint, repaint, update but they all seem to
fail.
The button is repainted only when I press it, (when I press the left
mouse
button).

Thaks in advance
Tilemachos


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hal Vaughan | last post by:
I have a "wizard" type program with a series of panels that are placed in a JPanel. When the "Next >" button is pressed, I put in a new panel (in other words, the ActionListener for "Next >"...
0
by: Phil | last post by:
I have a .net/C# com object that creates a thread and a window to output results obtained in the thread (the thread is reading a com port). Everything seems to be working correctly (I don't get any...
0
by: Mike Richardson | last post by:
Hello, I am using VB.net. Is there a way to stop the screen from repainting. I would perfer to stop screen repainting for the entire application. Example when a form is loading. Stop...
2
by: Phil | last post by:
I have a .net/C# com object that creates a thread and a window to output results obtained in the thread (the thread is reading a com port). Everything seems to be working correctly (I don't get any...
2
by: Geraldine Hobley | last post by:
Hello, In my application I am trying to load up some forms, however the loading of the forms is causing a lot of flickering. Are there any commands that can stop showing the repainting of the forms...
5
by: Jesse Aufiero | last post by:
Hello all, I have many buttons on a form and at the bottom of the form is a grid that behaves as though it is 'retractable' - at various times during the life of the app, the grid becomes taller...
6
by: Scott | last post by:
I have a unbound MS graph object built as a pie chart that I set to a value list and I am updating programatically. Everything works except that the graph does not repaint except for when the...
8
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have created a Control that extends RichTextBox to do syntax-hilighting. My strategy is to have a timer that restarts every time a user types a key so that it can wait until the user pauses for...
2
by: vunet.us | last post by:
Please, explain an interesting phenomenon, if you can. I have an array of references to an HTML element: <div id='container'> <div id='someId1'></div> <div id='someId2'></div> </div> ........
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.