Skip to main content

Posts

Showing posts with the label tabs

JTabbedPane: change tab size when change tab title

I have a a JTabbedPane myTab within my JFrame. Its first tab has a title of "old title". I want to change the title dynamically, so I use this code to set: myTab.setTitleAt(myTab.getSelectedIndex(), "my full new title"); And somehow my new title is longer than my old one. The problem is, the tab size does not change, and it does not display the new title fully, only "my full n...". And if I click on the tab, suddenly the tab can show full new title. I already tried this code too, to set the title name: myTab.setTabComponentAt(myTab.getSelectedIndex(), new JLabel("my full new title")); This code can help me change the tab size accordingly to the new title. But the cross (x) to close tab is not there anymore. Does anyone know how to change the tab size when changing tab title, but still keep the close tab option? Thank you and much appreciate!

jquery tabbed trade click for mouse over

I'm using some one else's plugin and I see that it has configurations available, ie. 'tabs:true'(see below). When I look at the plugin file it's just one long line that includes some of these settings separated by pipes '|' like, |scrollspeed|scrolleasing|panelfxfirst|panelbtnshover|verticalslide| <- What are these called so I can google how to use them? I've tried adding panelbtnshover=true, and there was no hover effect. My guess is need to read the two jquery books I bought some more. <script type="text/javascript"> $(window).load(function(){ //$(window).load() must be used instead of $(document).ready() because of Webkit compatibility // Tabs > Standard $(".tabs-standard").sliderkit({ auto:false, tabs:true, //mousewheel:true, circular:true, panelbtnshover:true, panelf