according to the picture above, when I click on border property, it dosesn't show me border and title border to select the border and show this picture above.
before it did work correctly and show border to select
I don't know what is the problem with that.
If you are using netbeans, you can click on Design tab, click on the JPanel either in the frame/Design area or from the Navigator and look for Border attribute in the Pallete window. Click the ellipsis button here. You get your desired window. Hope this helps.
it was my fault
instead of I click on properties tab, I clicked on the binding tab and I looked forward it.
what the stupid man I am.
Related
After long time i have decided to switch back to Java NetBeans Gui builder. I want to create Management System and keep it professional in terms of User Interface. However am having problem centering the JLabel. My Label takes the full width of the panel and panel is resizable. I want my Label to be resizable and to be centered no matter the size my window. Is this possible? Please I don't want hard coding am using netbeans Gui builder. How can I achieve this? For your information my reputations are too low to post images so nothing to show right now.....
This seemed to work for me.
Drag a panel into your design
Right-click the panel and check the menu checkboxes : Auto Resizing-> Horizontal , and Auto Resizing -> Vertical
Drag a label as the only component
Select the panel. Right-click -> Set Layout -> Border Layout
Select the label. Right-click -> Properties
Choose Center for the both horizontalAlignment and verticalAlignment.
I created a JFrame and in the top right corner I have 3 buttons (minimize, maximize, close). How do I get the size of these buttons? I want to place a new button just to the left of the minimize button in the title bar but I need to know how much space these existing buttons take up so that I don't place my button on top of them. ie If you open a recent version of the Chrome browser you'll see a button beside the minimize button in the browser window. I want to do the same sort of thing in my Java application.
What your describing is very advanced.
An alternative route would be to use:
setUndecorated(true);
Then create your own window decorations. This way everything matches and you can add all of the button that you want.
I am creating a desktop application in Java with lots of customized UI.
It also has a breadcrumb.
I've extended JButton class to customize it for my Breadcrumb buttons.
This is the screenshot of expected breadcrumb.
http://puu.sh/4MtvZ.jpg
The background of this breadcrumb is an ImageIcon.
But now, I am not able to perfectly align the JButton text over this background icon.
This is the screenshot of actual breadcrumb.
http://puu.sh/4MtDc.png
I've used following code to align the text.
setHorizontalTextPosition(CENTER);
setVerticalTextPosition(CENTER);
So, is their a way that I can move this text in pixels to its right position?
And also, I want root breadcrumb button "Schemes" to overlap some part of its preceding breadcrumb button "2000 Avenues" as shown in expected breadcrumb screenshot!
How can I achieve that?
Check out the Overlap Layout for one solution.
So, is their a way that I can move this text in pixels to its right position?
I don't understand this question. Why are you setting the alignment to center if you want it aligned to the left.
Edit:
I see. You are just using an Icon for the button outline and are then painting the text on top of the Icon. I thought your were using a custom shaped button with text). You can just use the default vertical/horizontal text position settings.
To shift the text to the left you can use:
button.setIconTextGap(10 - button.getIcon().getIconWidth());
After dragging and dropping a button in the design view, do I need to set the button to be visible in the source code? After testing it, the buttons do not appear.
befor using Drag and drop in netbeans you have to Drop Panel in form,then drop other component in the panel. for example , you want use commandButton. first you should Drag and drop panel in form then drop commandbutton in that panel.
very easily...
Below is the snapshot of the layout I'm trying to achieve.
I have two questions/problems here:
Right now,the page loads with all the accordian panels open. I want it initially to be in the closed state (like in option 1).
On click of the Radio button near the tab, the tab should expand. If I click on another radio button, the new tab associated with the radio button should expand, and the other one should close.
How do we accomplish this ?
I don't see any toggle function or anything associated with PrimeFaces accordian. There is only widgetVar.show() function, but it's not helping me.
To begin with your accordion panel tabs closed try setting activeIndex to -1 (or any value that does not correspond to an existing panel). I have not tested this with multiple tabs in an accordion panel, but it should work:
<p:accordionPanel activeIndex="-1">