java


How can I overlap components in Java? [duplicate]


I have a JScrollPanel that includes a big panel which it's self includes 3 inner panels. i want to put a panel (for example) in a special place so that always could be seen, I mean the user can scroll to anywhere wants but that panel always is in top of the other components and doesn't move. I tried to do that via JLayeredPane but I couldn't. how may I do that?
There's a JLayeredPane example here, but OverlayLayout, seen here, may be of interest. It's not included in the conventional gallery.
Also consider this example that paints on the scroll pane's JViewport.
You could use
The GlassPane
JLayeredPane
To overlay content on top of the other components on the screen
Couldn't you just put the content that you don't want to move in a separate JPanel that isn't the scrolling panel? I don't see any reason to include it in the scrolling panel if you don't want it to scroll.
So have one big panel (call it bigPanel or something) that doesn't scroll. Then have the panel that you don't want to scroll in bigPanel. Then also put the scrolling panel in bigPanel as well.
Perhaps I'm missing something, but wouldn't that solve your problem?

Related Links

Can not populate List<Item> from XML nodes
Clicking the webelement in dropdown menu with Selenium / Java
InetAddress.getLocalHost() slow to run (30+ seconds)
What is the max size of string that BeanPropertyRowMapper supports?
Jars with same name of class file and with same package structure
JAVA JsonArray to regular multidimensional array
Spring: Why “root” application context and “servlet” application context are created by different parties?
Better way to add the dependency projects to the classpath?
Asynch component call from Java webservice
Comparing object to ArrayList in Dictionary Program
Live streaming with red5 server not working on my live site
Load ApplicationContext using spring in session in Swing Window Application
Jar created from ant not able to find external jars
Server not getting data from client - JAVA
How to reactivate TLS1.0 in JRE8u60
Hibernate criteria for a foreign key list

Categories

HOME
twitter
asp.net-core
wso2
urbancode
tinymce
react-router
rsync
setup-deployment
frameworks
pivotal-cloud-foundry
convolution
constraint-programming
bs4
android-youtube-api
session-variables
google-apps-marketplace
zend-framework3
decimal
interop
graphicsmagick
dcevm
cultureinfo
javacv
dynamic-featured-image
web-api-testing
gsoap
bluestacks
nameservers
catel
jmonkeyengine
http-digest
email-templates
android-tabhost
quadratic-programming
eigenvalue
nativeapplication
csound
snmptrapd
iso8601
nested-sets
medium.com
httplistener
probability-density
bonobo
sigabrt
yaws
php-parse-error
tform
javax.sound.midi
qtableview
endeca-workbench
mutation-observers
arcanist
sailfish-os
unity5.2.3
truevault
apache-commons-net
directoryservices
formatjs
camanjs
android-nested-fragment
nsbutton
asp.net-web-api-odata
id3v2
funcunit
mysql-error-1062
floating-point-precision
farseer
ms-project-server-2010
apc
jplaton
trusted
gil
manchester-syntax
getmessage
netbeans-6.9
boost-filesystem
php-parser
nsobject
netbeans-7.1
disclosure
propagation
jmock
revisions
nsviewanimation
libs
post-build
uiq3

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App