Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 31st, 2005, 7:29 PM   #1
B3TA_SCR1PT3R
Hobbyist Programmer
 
B3TA_SCR1PT3R's Avatar
 
Join Date: Jul 2005
Location: Dallas, Texas
Posts: 101
Rep Power: 0 B3TA_SCR1PT3R is an unknown quantity at this point
Send a message via AIM to B3TA_SCR1PT3R
Transparent GUI?

Does anyone know if its possible to change the opacity of a GUI in Swing, or make it transparent?
__________________
Hoes telling me to calm down but I'm like fuck that shit!
B3TA_SCR1PT3R is offline   Reply With Quote
Old Jan 1st, 2006, 6:46 PM   #2
B3TA_SCR1PT3R
Hobbyist Programmer
 
B3TA_SCR1PT3R's Avatar
 
Join Date: Jul 2005
Location: Dallas, Texas
Posts: 101
Rep Power: 0 B3TA_SCR1PT3R is an unknown quantity at this point
Send a message via AIM to B3TA_SCR1PT3R
Bump-Izzle!?

since i cant edit previous post, i meant to say on a JFrame can i make it somewhat invisible.
__________________
Hoes telling me to calm down but I'm like fuck that shit!
B3TA_SCR1PT3R is offline   Reply With Quote
Old Jan 1st, 2006, 7:45 PM   #3
groovicus
Programmer
 
Join Date: Nov 2004
Posts: 84
Rep Power: 4 groovicus is on a distinguished road
I'm a little fuzzy on this at the moment (it is the day after New Years, after all )
Anyway, IIRC, you will have to use JNI because it is the Windows OS that controls how the windows are drawn, so it is Windows that must be manipulated.
__________________
HijackThis Team-SFDC
groovicus is offline   Reply With Quote
Old Jan 2nd, 2006, 11:58 AM   #4
alcdotcom
Programmer
 
Join Date: Jan 2006
Location: Dallas, TX
Posts: 49
Rep Power: 0 alcdotcom is on a distinguished road
There is a non native way to do it, however, I'm not sure how fast or smooth it is. I have tried things similar to this to make transparent backgrounds and they seem to work fairly well, but when I dragged them around to fast I saw a little distortion while they were repainting. Try it out and see what you think.
http://www.onjava.com/pub/a/onjava/e...inghks_hack41/
alcdotcom is offline   Reply With Quote
Old Jan 2nd, 2006, 12:10 PM   #5
groovicus
Programmer
 
Join Date: Nov 2004
Posts: 84
Rep Power: 4 groovicus is on a distinguished road
I saw that method also, but to me that isn't really making the window transparent, but I suppose if it serves the purpose, then why not use it.
__________________
HijackThis Team-SFDC
groovicus is offline   Reply With Quote
Old Jan 2nd, 2006, 2:36 PM   #6
B3TA_SCR1PT3R
Hobbyist Programmer
 
B3TA_SCR1PT3R's Avatar
 
Join Date: Jul 2005
Location: Dallas, Texas
Posts: 101
Rep Power: 0 B3TA_SCR1PT3R is an unknown quantity at this point
Send a message via AIM to B3TA_SCR1PT3R
thanx, alcdotcom, it works perfectly, for 100+ lines of code!?, god why couldnt sun just implement a transparency feature in java themselves...jerks...
__________________
Hoes telling me to calm down but I'm like fuck that shit!
B3TA_SCR1PT3R is offline   Reply With Quote
Old Jan 2nd, 2006, 3:02 PM   #7
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
I assume because Sun's goal is to make Java completely platform independant (not all OSes support transparency), and because the Swing is a pretty old toolkit, designed when transparency support was not commonplace. Sun also tend to take their sweet time with updates
Arevos is offline   Reply With Quote
Old Jan 2nd, 2006, 3:06 PM   #8
groovicus
Programmer
 
Join Date: Nov 2004
Posts: 84
Rep Power: 4 groovicus is on a distinguished road
Talking

Quote:
god why couldnt sun just implement a transparency feature in java themselves...jerks...
Yeah.. I'd ask for your money back..
__________________
HijackThis Team-SFDC
groovicus is offline   Reply With Quote
Old Jan 4th, 2006, 3:16 PM   #9
alcdotcom
Programmer
 
Join Date: Jan 2006
Location: Dallas, TX
Posts: 49
Rep Power: 0 alcdotcom is on a distinguished road
Being platform independant has its advantages, but when you want a specific platform behaviour (beyond L&F) it can be annoying. They have added some new features to Mustang (JDK 1.6) that will fill some of the gaps. Maybe they'll even uptade the HTMLEditor kit support modern web standards so I can stop using 3rd party code to render HTML.
alcdotcom is offline   Reply With Quote
Old Jan 8th, 2006, 4:35 PM   #10
B3TA_SCR1PT3R
Hobbyist Programmer
 
B3TA_SCR1PT3R's Avatar
 
Join Date: Jul 2005
Location: Dallas, Texas
Posts: 101
Rep Power: 0 B3TA_SCR1PT3R is an unknown quantity at this point
Send a message via AIM to B3TA_SCR1PT3R
ok is there anyway i can interface with windows or something along those lines, screw cross platform i just want a friggin transparent gui.(not transparent, but change the opacity to less than 100%), i know you can do it in C#, so is there a windows api i should look for?
__________________
Hoes telling me to calm down but I'm like fuck that shit!
B3TA_SCR1PT3R is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:55 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC