Pretty JPanels in Swing - swing

I'm currently working on making my Swing application look better. I want to achieve something along these lines:
The idea is for each box to have a pretty header with a background similar to the above image. The closest I can get to anything like this using basic Swing components is adding a TitledBorder but this is nothing close to what I want.
I have experiment with JXTaskPane from SwingX, which is close:
http://img411.imageshack.us/img411/6866/image431.png
And near perfect, except for the fact that it's collapsible and it doesn't appear possible to make it not collapsible.
Are there any obvious solutions I'm missing here? Otherwise I figure extending JPanel and creating a special header for it using a image for the background of the header.
Any pointers greatly appreciated. Thanks.

Since you already looking into SwingX components, why don't you use JXTitledPanel? I think it is very close to what you want to achieve. You can set your own colors there.

Yes, why not write your own custom border or JPanel for that? You customize the painting by overriding the paintComponent-method.

Related

HTML UI input slider being pushed out of position

Hi guys, in the above image there is a screenshot of a UI I am working on for the purposes of a college assignment which involves manipulating the DOM using JQuery.
Currently I have the logic working and I am now trying to tidy my code and enhance the UI. I'm not sure if this is the correct place to ask this question as strictly speaking I do not think it is a programming issue but I thought I'd take my chances!
For some reason the slider in the image above is being pushed out of place and I have no idea why. Does anyone know what might be causing this??
The stylesheet is huge so I don't want to include it, unless you need to see a certain part.
Any help is much appreciated.
In the image the circle shows the slider trailing off the UI. The arrow points to where It should be located. The underlined slider is how it should also be appearing.

Remove Child? AS3

So I'm incredibly new to AS3, and barely know my way around.
I built a simple colouring book game, essentially changing some of the graphics of a tutorial, and replacing numbers and sizes to fit what I wanted to achieve. I then built a menu screen in a seperate scene and linked the two with code snippets and buttons to go back and forth.
The colour pickers are generated when the game is ran, however an issue I seem to be facing is that when I go back to my main menu, they are still there.
Can someone point me in the right direction as to how I can fix this? I'm sure it's a rather simple fix. I can provide the code from the tutorial if needed
I think you're right you need removechild this color to remove one color from stage... Maybe you need removechildren to remove all color, whin are on stage... Try this two way

An overlay GTK toolbar/widget

I am writing a custom application in C using GTK+2.0 and Cairo. Just for learning purposes (and if successful, then for deployment), I wish to recreate something similar to a overlay toolbar/widget (I am sorry if the terminology is not correct) that appears when a mouse moves over a given area on the window, and disappears when the mouse moves away. The toolbar, as I imagine, should appear on top of the existing widgets without displacing them or altering the widget packing in any way. Is it possible to accomplish? If yes, can you please point me to relevant tutorials/examples and/or outline a way to do the same?
Thanks in advance.
Not sure this is easily doable in GTK2. However, I learned recently that there's the GtkLayout widget which allows pixel exact rendering of widgets, so you can even display some widgets over others. Or you may implement your own container widget.
Please note that since GTK3, there's GtkOverlay which seem to do what you want.
You may also give a look to Clutter, which might allow this. Furthermore, there are projects of merging GTK and Clutter for GTK 4.
The little known GtkHandleBox is capable of doing what you want. I must warn you it is deprecated in GTK+3 because is going against the usual UI direction. Also, the correct positioning will be subject to the windows manager quirks, so I'd expect some issue in this regard.

Animate HTML Menu bar item

I am trying to create an animated menu bar, in which the background block moves from the current selection to the latest one. For an example, have a look at http://www.creative-jar.com/. I would like to accomplish this in the simplest possible manner (perhaps using only HTML and CSS). Any help will be really appreciated.
As I am new to web development, thoughts on whether this sort of animation is a good or bad idea are also welcome.
There's a jQuery plugin that does exactly what you describe: http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/

SWING JPanel / JXPanel Animation

In SWING is there a good/easy way of animating a the show and hide of a JPanel? I would like animate the expand of a JPanel height. I figured I could use a timer and increment the height, but was hoping there was something already out there.
Here is an example: (I know this is a web app.... sry). Click Login at the top.
http://web-kreation.com/demos/Sliding_login_panel_jquery/#
Thanks
SwingX comes with a JXCollapsiblePanel which might be helpful. Its demo shows it in action (as taskPanes) at the left - that's the part for choosing the demos.
I would recommend Trident animation framework. I will simplify proper animation based on the properties of your panel
I'd recommend the TimingFramework: http://java.net/projects/timingframework/
It was written by some of the guys from the Swing team before the left a few years ago.
If you really want to look into this in some detail I would recommend picking up Filthy Rich Clients by Chet Hausse and Romain Guy. It's the definitive book about how to do fancy things in a Swing app.