Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to make a irregular container  RSS feed

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I was just making a standalone application and this comes in my mind. Can I make a irregular shape container. What I mean is that if I use some container say JFrame etc. it gives me rectangular shape. But my desginer want it to give some irregular shape perhaps say Oval or some more irregular.
Is it possible or I am just thinking weird?
Any suggestions?
regards,
Arun
 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was just wondering if it possible or not? Or I am just thinking wierd?
Pl atleast reply back, even if you think it is not possible.
regards,
Arun
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know in c++ its possible, but im not sure in java it is.
maybe try the awt and JNI to make it work.
 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roy,
I would be intrested to know how it is possible in C++? Is there some API available or one has to work around for same? In case some API is avaiable can you pl mention the same?
regards,
Arun
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it doesnt involve API, just some tricks etc..
here is a link about that that will help u:
forum discussion about irregular windows
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's an older post on JavaRanch about how to do this in Java... it calls native code, but at least the 3rd party API does it instead of having to write it yourself...

-Nate
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!