I want to create a JToolBar without adding it into any JFrame window. If I have to add it, then how can I make it such that the toolbar is created as a floating toolbar not a docking toolbar?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you are going to need to override
BasicToolBarUIand set the toolbars parent to an instance of JDialog which is bound to the current frame, that way you can float a toolbar by default and keep it on top of the frame.