Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Irregular window in Java ?  (Read 5565 times)
0 Members and 1 Guest are viewing this topic.
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Posted 2003-03-16 16:24:13 »

I wonder if there was a way to create an irrgular window in Java... by "irregular" I mean that it can be, for example, a triangle window, or a circular window, or even a window with transparent hole in it!

Does anyone knows how to do that in Java ? or is there any lib (native or not) available on the web to do that ?

Thanks
Chman
Offline JasonB

Junior Devvie





« Reply #1 - Posted 2003-03-16 16:46:19 »

I recall l2fprod having a native (windows) DLL for doing irregular windows.  haven't checked recently, but it might still be available (www.l2fprod.com)
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #2 - Posted 2003-03-17 07:34:18 »

Not something I've tried, but I believe it should work:

If you use a "Window" not a "Frame" you do away with all the titlebars, window frame etc.  Then you can use a pixel-grabber to snapshot the screen contents behind your window, and paint them over the top to make your window effectively transparent.  Then you're free to draw whatever shape windows you want!

PROS: Works pretty much everywhere without need for external libraries.

CONS: A lot more work, and you have to draw all the window decorations you want manually.

Hellomynameis Charlie Dobbie.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #3 - Posted 2003-03-17 12:07:55 »

Thx for your replies...
I think cfmdobbie's solution is a good one (no need for external libs) but is not the easier to do... and not the faster !
Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #4 - Posted 2003-03-17 12:16:38 »

cfmdobbie's solution does not cover event handling! I don't know how to ignore mouseclicks to the non-opaque parts of the window or to delegate them to the desktop/parent.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #5 - Posted 2003-03-17 12:25:07 »

ah yeah it's true, i haven't thought about that... o l2fprod would be a great solution but it's windows specific so...
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #6 - Posted 2003-03-17 13:02:21 »

Good point - I hadn't considered event handling. Grin Tongue

Hrm, with the requirement to properly handle window events as well, I'm afraid you're high and dry.  There's no way I know to do that in a platform-independant way.  You will probably have to drop back to JNI, get a handle to the window and manipulate it directly with native windowing commands.  Ouch.

Hellomynameis Charlie Dobbie.
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #7 - Posted 2003-03-17 14:27:13 »

Ouch ! Smiley
I will finally keep my classical Java JFrame...
Offline pepe

Junior Devvie




Nothing unreal exists


« Reply #8 - Posted 2003-03-18 02:49:46 »

there was a thread on the old board about that. there was even some code using Robot's screencapture.
The thread ended with "it's a 1.5 feature", as far as i recall.. Smiley

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline pepe

Junior Devvie




Nothing unreal exists


« Reply #9 - Posted 2003-03-18 02:55:37 »

Heh.. got it...
http://www.java-gaming.org/discus/messages/2/1315.html

chman.. chman.. ca me rappelles une anim sous flash avec un gars 'chevelu' sur une plage ou pas loin..  un rapport?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #10 - Posted 2003-03-19 16:09:12 »

Ca fait plaisir de voir des francais sur cette board !
non en fait ca n'a aucun rapport avec la team cHMan... tu faisait référence à Banja, un jeu en flash de la team en question...
mon pseudo vient de nul part... et j'ai l'habitude de l'écrire Ch*man pour éviter la confusion avec cHMan...
Offline mill

Junior Devvie




popcorn freak


« Reply #11 - Posted 2003-03-20 18:09:48 »

argh! why do people post in languages other than english? english the the most common language here as this is a forum and the whole purpose is to let people communicate. i'm sure everyone would understand me typing swedish!

bad english is also ok! (i know you french people don't like it very much)

Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #12 - Posted 2003-03-20 20:15:16 »

Don't worry, the messages aren't intended to be read by anyone else! Grin  Pepe and Ch*man normally do write in English.

I'm afraid I'd be lost if you started writing Swedish, although it would add to the atmosphere.  I'm afraid all the Swedish I know is something about a chocolate moose...? Wink Cheesy Grin Roll Eyes

Hellomynameis Charlie Dobbie.
Offline mill

Junior Devvie




popcorn freak


« Reply #13 - Posted 2003-03-20 20:38:33 »

it's not so bad on this forum, not yet anyway. at cgtalk for instance it's a common thing and it's pretty pointless.

anyway, i have no idea what chocolate moose you're talking about lol Smiley

sorry for drifting away from topic..

Offline pepe

Junior Devvie




Nothing unreal exists


« Reply #14 - Posted 2003-03-21 02:04:37 »

Hem, sorry, guys. The little french sentence was to ask about the origin of ch*man's nick. There are times you feel quite alone as a French citizen, actually more than ever. Cry Some 'native' words  help sometimes. Well... Enough drama, will not do that again, i swear. (moreover, i wasn't sure to explain myself correctly in english.. that was a lazy solution as well. )

Back on topic. After re reading the bug report i posted here,  and the answer from sun, i'm not sure that the RFE is to be implemented. Isn't there an AWT team member reading us?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline mill

Junior Devvie




popcorn freak


« Reply #15 - Posted 2003-03-21 05:45:42 »

you're not alone, we are all with you! Smiley

Offline javatypo

Junior Devvie





« Reply #16 - Posted 2003-04-06 19:24:51 »

having a transparent window could post some pretty weird things..

like u could make your program launch an entire window, that is totally transparent, and have no way out..

hehe.. that'd be pretty funny..

why do u want a transparent window anyway??
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #17 - Posted 2003-04-06 21:42:06 »

It's less having transparent windows than shaped windows.  Rounded corners to your windows, a round (analogue) clock, see-through areas etc.

Hellomynameis Charlie Dobbie.
Offline javatypo

Junior Devvie





« Reply #18 - Posted 2003-04-07 18:06:50 »

thatd be annoying to have se thru parts of a window..

wouldnt it?
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #19 - Posted 2003-04-07 19:27:20 »

Um.  Not if that's what you wanted to have? Roll Eyes

Hellomynameis Charlie Dobbie.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #20 - Posted 2003-04-07 23:59:30 »

Rounded corners, or completely wacky UI shapes like the skinned views of latest MS Media players..  That's the sort of stuff that we need.

It would also be a way to drag arbitrary objects over the desktop.. instead of just getting some lame cursor that doesn't really show what is happening.

I think it is time to add support for windows with an alpha channel (even if it is restricted to 1-bit on some platforms) to Java.  All popular windowing systems support this feature now, so it makes sense.

Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #21 - Posted 2003-04-08 00:09:16 »

sounds like fun,
though I dread to think how a semi transparent full screen frame would behave Tongue

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (85 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (79 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (97 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (152 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!