JTabbed Panel Problem

When I try to launch this application, nothing ever comes up.
The server itself worked great when it was a standalone, console app. I tried to modify the JTabbedPanel code so it wasn't an extended JPanel class. I had to do that because I couldn't access one of the text fields (it contains all the console information).
Thanks
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.SwingUtilities;
public class ServerInterface {
     public gameServer server;
     public int port;
     public JTextArea consoleData;
     public ServerInterface(gameServer server) {
     this.server = server;
     this.port = server.port;
     try {
            UIManager.setLookAndFeel(
                UIManager.getCrossPlatformLookAndFeelClassName());
        } catch (Exception e) { }
        //Create the top-level container and add contents to it.
      JFrame frame = new JFrame("Red Ion Server Interface v0.1");
      frame.setResizable(false);
      frame.setBounds(40, 40, 40, 40);
     frame.getContentPane().add(getPane(), BorderLayout.NORTH);
        //Finish setting up the frame, and show it.
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
        frame.pack();
        frame.setVisible(true);
     public JPanel getPane() {
          JPanel mainPane = new JPanel();
          ImageIcon icon = new ImageIcon("images/ri.gif");
          JTabbedPane tabbedPane = new JTabbedPane();
        Component panel1 = makeMainTab();
        tabbedPane.addTab("Main", icon, panel1, "Main Server Functions");
        tabbedPane.setSelectedIndex(0);
        Component panel2 = makeStatusTab();
        tabbedPane.addTab("Status", icon, panel2, "Current Server Status");
        tabbedPane.setSelectedIndex(1);
        Component panel3 = makeConfigTab();
        tabbedPane.addTab("Config", icon, panel3, "Server Configuration");
        tabbedPane.setSelectedIndex(2);
        Component panel4 = makeConsoleTab();
        tabbedPane.addTab("Console", icon, panel4, "Opens the Console");
        tabbedPane.setSelectedIndex(3);
        //Add the tabbed pane to this panel.
        tabbedPane.setLayout(new GridLayout(1, 1));
        tabbedPane.add(tabbedPane);
        mainPane.setLayout(new GridLayout(0, 1));
        mainPane.add(tabbedPane);
        return mainPane;
          public Component makeStatusTab() {
          JTextField ServerName = new JTextField(20);
         JLabel ServerNameLabel = new JLabel(" Server Name");
         JLabel junk = new JLabel(" ");
         JTextField ServerPort = new JTextField(20);
         JLabel ServerPortLabel = new JLabel(" Server Port");
         JButton startButton = new JButton("Start Server");
        startButton.setMnemonic(KeyEvent.VK_I);
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               final SwingWorker worker = new SwingWorker() {
                       public Object construct() {
                      server.startServer(port);
                      return "asd";
                   worker.start();
             JButton stopButton = new JButton("Stop Server");
        stopButton.setMnemonic(KeyEvent.VK_I);
        stopButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               server.killServer();
        JPanel inputPane = new JPanel();
        inputPane.setLayout(new GridLayout(0, 1));
        inputPane.add(ServerName);
        inputPane.add(ServerPort);
        inputPane.add(startButton);
        inputPane.add(stopButton);
        JPanel labelPane = new JPanel();
        labelPane.setLayout(new GridLayout(0, 1));
        labelPane.add(ServerNameLabel);
        labelPane.add(ServerPortLabel);
        labelPane.add(junk);
        labelPane.add(junk);
          JPanel contentPane = new JPanel();
        contentPane.setBorder(BorderFactory.createEmptyBorder(
                                        30, //top
                                        30, //left
                                        10, //bottom
                                        30) //right
          contentPane.setBorder(BorderFactory.createEmptyBorder(20, 20,
                                                      20, 20));
          contentPane.setLayout(new BorderLayout());
          contentPane.add(inputPane, BorderLayout.CENTER);
          contentPane.add(labelPane, BorderLayout.EAST);
          contentPane.setPreferredSize(new Dimension(400,300));
        return contentPane;
          public Component makeConsoleTab() {
     consoleData = new JTextArea("D");
     consoleData.setFont(new Font("Arial", Font.BOLD, 12));
     consoleData.setLineWrap(true);
     consoleData.setWrapStyleWord(true);
     consoleData.setEnabled(false);
     JScrollPane consoleDataScroll = new JScrollPane(consoleData);
          JTextField consoleInput = new JTextField(20);
        JPanel inputPane = new JPanel();
       inputPane.setLayout(new BorderLayout());
        inputPane.add(consoleDataScroll, BorderLayout.CENTER);
        inputPane.add(consoleInput, BorderLayout.SOUTH);
          inputPane.setPreferredSize(new Dimension(400,300));
        return inputPane;
     public Component makeMainTab() {
     JTextField ServerName = new JTextField(20);
         JLabel ServerNameLabel = new JLabel(" Server Name");
         JLabel junk = new JLabel(" ");
         JTextField ServerPort = new JTextField(20);
         JLabel ServerPortLabel = new JLabel(" Server Port");
         JButton startButton = new JButton("Start Server");
        startButton.setMnemonic(KeyEvent.VK_I);
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               final SwingWorker worker = new SwingWorker() {
                       public Object construct() {
                      server.startServer(port);
                      return "asd";
                   worker.start();
             JButton stopButton = new JButton("Stop Server");
        stopButton.setMnemonic(KeyEvent.VK_I);
        stopButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               server.killServer();
        JPanel inputPane = new JPanel();
        inputPane.setLayout(new GridLayout(0, 1));
        inputPane.add(ServerName);
        inputPane.add(ServerPort);
        inputPane.add(startButton);
        inputPane.add(stopButton);
        JPanel labelPane = new JPanel();
        labelPane.setLayout(new GridLayout(0, 1));
        labelPane.add(ServerNameLabel);
        labelPane.add(ServerPortLabel);
        labelPane.add(junk);
        labelPane.add(junk);
          JPanel contentPane = new JPanel();
        contentPane.setBorder(BorderFactory.createEmptyBorder(
                                        30, //top
                                        30, //left
                                        10, //bottom
                                        30) //right
          contentPane.setBorder(BorderFactory.createEmptyBorder(20, 20,
                                                      20, 20));
          contentPane.setLayout(new BorderLayout());
          contentPane.add(inputPane, BorderLayout.CENTER);
          contentPane.add(labelPane, BorderLayout.EAST);
          contentPane.setPreferredSize(new Dimension(400,300));
        return contentPane;
     public Component makeConfigTab() {
     JTextField ServerName = new JTextField(20);
         JLabel ServerNameLabel = new JLabel(" Server Name");
         JLabel junk = new JLabel(" ");
         JTextField ServerPort = new JTextField(20);
         JLabel ServerPortLabel = new JLabel(" Server Port");
         JButton startButton = new JButton("Start Server");
        startButton.setMnemonic(KeyEvent.VK_I);
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               final SwingWorker worker = new SwingWorker() {
                       public Object construct() {
                      server.startServer(port);
                      return "asd";
                   worker.start();
             JButton stopButton = new JButton("Stop Server");
        stopButton.setMnemonic(KeyEvent.VK_I);
        stopButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               server.killServer();
        JPanel inputPane = new JPanel();
        inputPane.setLayout(new GridLayout(0, 1));
        inputPane.add(ServerName);
        inputPane.add(ServerPort);
        inputPane.add(startButton);
        inputPane.add(stopButton);
        JPanel labelPane = new JPanel();
        labelPane.setLayout(new GridLayout(0, 1));
        labelPane.add(ServerNameLabel);
        labelPane.add(ServerPortLabel);
        labelPane.add(junk);
        labelPane.add(junk);
          JPanel contentPane = new JPanel();
        contentPane.setBorder(BorderFactory.createEmptyBorder(
                                        30, //top
                                        30, //left
                                        10, //bottom
                                        30) //right
          contentPane.setBorder(BorderFactory.createEmptyBorder(20, 20,
                                                      20, 20));
          contentPane.setLayout(new BorderLayout());
          contentPane.add(inputPane, BorderLayout.CENTER);
          contentPane.add(labelPane, BorderLayout.EAST);
          contentPane.setPreferredSize(new Dimension(400,300));
        return contentPane;
}

I guess the problem is that you explictly set a size for each tab, and the JTabbedPane. If you let a LayoutManager do this for you the JTabbedPane will automaticly choose a size for itself and the panels that you add, so that all the panels get an equal size, just large enough that all the panels completely overlap.
So I guess you can just remove/comment out the lines where you set the minimum/preferred size for you panels and the tabbedpane.
Don't forget to call pack() on the window/JFrame where you add your components

Similar Messages

  • JCombobox on a jtabbed pane, AND Choice on jtabbed pane problems

    I have a Choice on a jtabbed pane, on a panel that isn't showing when the jtabbed pane is made visible. The Choice on the hidden pane is "bleeding" through to the first tabbed panel. help!
    If I click on the second tabbed panel (where the Choice is), and then click on the first tabbed panel, the Choice becomes hidden like it is supposed to.
    AND, I have a JComboBox on a JTabbedPane, it works for the most part, but when you click on it, the scrollbox underneath it doesn't appear! Instead, a grey box appears below it. Help!

    I was having similar problems when I was working with JFrames, Anything not covered by a piece of GUI would show other parts of my program (like the progress bar or buttons and stuff).
    Anyway, it went away when I used the setBackground() method. My guess is that using this forces the container to be opaque or something. Anyway, it worked for me, maybe it will work for you also.
    Steve

  • Spry Collapsible Panel problem

    Hi there,
    I've tried to create a few collapsible panels but I have come across a problem. When I checked the error debugger in FF, I get an issue that states "Spry undefined". I have checked a few of the forums on this and I have tried some of the solutions but still find myself stuck.
    http://tailoredart.ca/Mesco/default.html
    Please help.
    Thanks!

    That error means you Spry files cannot be found did you upload all 
    files to your server? If yes, than post a online.

  • Spry Collapsible Panel Problem in Safari

    When check my site in Firefox, there are no problems, but
    when I open it in Safari, none of the CSS settings are applied to
    the Collapsible Panel widget. Some settings I have make the widget
    200 px width and make it have a black background, but Safari
    doesn't show these. HERE IS THE CODE OF MY HOMEPAGE:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=UTF-8" />
    <style type="text/css">
    body {
    background: url(Victorias%20Secret%20models.jpg) fixed
    no-repeat center bottom;
    </style>
    <script src="SpryAssets/SpryCollapsiblePanel.js"
    type="text/javascript"></script>
    <link href="SpryAssets/SpryCollapsiblePanel.css"
    rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="CollapsiblePanel1" class="CollapsiblePanel">
    <div class="CollapsiblePanelTab"
    tabindex="0"></div>
    <div class="CollapsiblePanelContent">
    <p>BLOG</p>
    <p>LISTEN</p>
    <p>WATCH</p>
    <p>ABOUT</p>
    </div>
    </div>
    <script type="text/javascript">
    var CollapsiblePanel1 = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel1",
    {contentIsOpen:false});
    </script>
    </body>
    </html>
    AND HERE IS THE CODE OF MY CSS
    @charset "UTF-8";
    .CollapsiblePanel {
    margin: 0px;
    padding: 0px;
    width: 200px;
    color: #FFFFFF;
    background-color: #000000;
    .CollapsiblePanelTab {
    background-color: #000000;
    margin: 0px;
    padding: 0px;
    cursor: pointer;
    -moz-user-select: none;
    -khtml-user-select: none;
    font-family: sans-serif;
    font-size: 0.7em;
    font-weight: bold;
    color: #FFFFFF;
    height: 40px;
    .CollapsiblePanelContent {
    margin: 0px;
    padding: 0px;
    background-color: #000;
    .CollapsiblePanelTab a {
    color: black;
    text-decoration: none;
    background-color: #000;
    height: 40px;
    .CollapsiblePanelOpen .CollapsiblePanelTab {
    background-color: #000;
    color: #FFFFFF;
    .CollapsiblePanelTabHover, .CollapsiblePanelOpen
    .CollapsiblePanelTabHover {
    background-color: #000;
    .CollapsiblePanelFocused .CollapsiblePanelTab {
    background-color: #000;
    THANKS FOR YOUR HELP

    Can't tell by that code, can you post a URL to the page?
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Fordwebs, LLC
    http://www.fordwebs.com
    "kkaiser1" <[email protected]> wrote in
    message news:[email protected]...
    > When check my site in Firefox, there are no problems,
    but when I open it in
    > Safari, none of the CSS settings are applied to the
    Collapsible Panel widget.
    > Some settings I have make the widget 200 px width and
    make it have a black
    > background, but Safari doesn't show these. HERE IS THE
    CODE OF MY HOMEPAGE:
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    >
    > <title>Untitled Document</title>
    >
    > <meta http-equiv="Content-Type" content="text/html;
    charset=UTF-8" />
    > <style type="text/css">
    >
    > body {
    > background: url(Victorias%20Secret%20models.jpg) fixed
    no-repeat center
    > bottom;
    > }
    >
    > </style>
    > <script src="SpryAssets/SpryCollapsiblePanel.js"
    > type="text/javascript"></script>
    > <link href="SpryAssets/SpryCollapsiblePanel.css"
    rel="stylesheet"
    > type="text/css" />
    > </head>
    > <body>
    > <div id="CollapsiblePanel1"
    class="CollapsiblePanel">
    > <div class="CollapsiblePanelTab"
    tabindex="0"></div>
    > <div class="CollapsiblePanelContent">
    > <p>BLOG</p>
    > <p>LISTEN</p>
    > <p>WATCH</p>
    > <p>ABOUT</p>
    > </div>
    > </div>
    > <script type="text/javascript">
    >
    > var CollapsiblePanel1 = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel1",
    > {contentIsOpen:false});
    >
    > </script>
    > </body>
    > </html>
    >
    >
    > AND HERE IS THE CODE OF MY CSS
    >
    > @charset "UTF-8";
    >
    > .CollapsiblePanel {
    > margin: 0px;
    > padding: 0px;
    > width: 200px;
    > color: #FFFFFF;
    > background-color: #000000;
    > }
    >
    > .CollapsiblePanelTab {
    > background-color: #000000;
    > margin: 0px;
    > padding: 0px;
    > cursor: pointer;
    > -moz-user-select: none;
    > -khtml-user-select: none;
    > font-family: sans-serif;
    > font-size: 0.7em;
    > font-weight: bold;
    > color: #FFFFFF;
    > height: 40px;
    > }
    >
    > .CollapsiblePanelContent {
    > margin: 0px;
    > padding: 0px;
    > background-color: #000;
    > }
    >
    > .CollapsiblePanelTab a {
    > color: black;
    > text-decoration: none;
    > background-color: #000;
    > height: 40px;
    > }
    >
    > .CollapsiblePanelOpen .CollapsiblePanelTab {
    > background-color: #000;
    > color: #FFFFFF;
    > }
    >
    > .CollapsiblePanelTabHover, .CollapsiblePanelOpen
    .CollapsiblePanelTabHover {
    > background-color: #000;
    > }
    >
    > .CollapsiblePanelFocused .CollapsiblePanelTab {
    > background-color: #000;
    > }
    >
    >
    > THANKS FOR YOUR HELP
    >

  • Spry Collapsible Panel problem when previewing in web browser

    Hello.
    I have inserted a spry collapsible panel into my website, made ZERO adjustments to any of the scripting or even css styling, and previewed the panel in my Safari browser. It does not seem to be working correctly. I've attached a couple of images showing what the panel looks like in the browser. My site is not published yet, so I cannot give out the url.
    Is something wrong with the js file? I tried the panel earlier on a different site on the same computer and it was working fine.
    the "Tab" menu text does not fit inside the grey box. Everything collapses fine, however, the gray box is too thin for the text. I've tried adjusting it in the CSS sheet, but it doesn't seem to change anything.
    This is the panel in the collapsed state. It looks bad. I know it's not supposed to work like this.
    When I preview the site in "live view" everything works fine...
    // SpryCollapsiblePanel.js - version 0.8 - Spry Pre-Release 1.6.1
    // Copyright (c) 2006. Adobe Systems Incorporated.
    // All rights reserved.
    // Redistribution and use in source and binary forms, with or without
    // modification, are permitted provided that the following conditions are met:
    //   * Redistributions of source code must retain the above copyright notice,
    //     this list of conditions and the following disclaimer.
    //   * Redistributions in binary form must reproduce the above copyright notice,
    //     this list of conditions and the following disclaimer in the documentation
    //     and/or other materials provided with the distribution.
    //   * Neither the name of Adobe Systems Incorporated nor the names of its
    //     contributors may be used to endorse or promote products derived from this
    //     software without specific prior written permission.
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    // POSSIBILITY OF SUCH DAMAGE.
    (function() { // BeginSpryComponent
    if (typeof Spry == "undefined") window.Spry = {}; if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.CollapsiblePanel = function(element, opts)
    this.element = this.getElement(element);
    this.focusElement = null;
    this.hoverClass = "CollapsiblePanelTabHover";
    this.openClass = "CollapsiblePanelOpen";
    this.closedClass = "CollapsiblePanelClosed";
    this.focusedClass = "CollapsiblePanelFocused";
    this.enableAnimation = true;
    this.enableKeyboardNavigation = true;
    this.animator = null;
    this.hasFocus = false;
    this.contentIsOpen = false;
    this.openPanelKeyCode = Spry.Widget.CollapsiblePanel.KEY_DOWN;
    this.closePanelKeyCode = Spry.Widget.CollapsiblePanel.KEY_UP;
    Spry.Widget.CollapsiblePanel.setOptions(this, opts);
    this.attachBehaviors();
    Spry.Widget.CollapsiblePanel.prototype.getElement = function(ele)
    if (ele && typeof ele == "string")
    return document.getElementById(ele);
    return ele;
    Spry.Widget.CollapsiblePanel.prototype.addClassName = function(ele, className)
    if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
    return;
    ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.CollapsiblePanel.prototype.removeClassName = function(ele, className)
    if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
    return;
    ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
    Spry.Widget.CollapsiblePanel.prototype.hasClassName = function(ele, className)
    if (!ele || !className || !ele.className || ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)
    return false;
    return true;
    Spry.Widget.CollapsiblePanel.prototype.setDisplay = function(ele, display)
    if( ele )
    ele.style.display = display;
    Spry.Widget.CollapsiblePanel.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
    if (!optionsObj)
    return;
    for (var optionName in optionsObj)
    if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
    continue;
    obj[optionName] = optionsObj[optionName];
    Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver = function(e)
    this.addClassName(this.getTab(), this.hoverClass);
    return false;
    Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut = function(e)
    this.removeClassName(this.getTab(), this.hoverClass);
    return false;
    Spry.Widget.CollapsiblePanel.prototype.open = function()
    this.contentIsOpen = true;
    if (this.enableAnimation)
    if (this.animator)
    this.animator.stop();
    this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, true, { duration: this.duration, fps: this.fps, transition: this.transition });
    this.animator.start();
    else
    this.setDisplay(this.getContent(), "block");
    this.removeClassName(this.element, this.closedClass);
    this.addClassName(this.element, this.openClass);
    Spry.Widget.CollapsiblePanel.prototype.close = function()
    this.contentIsOpen = false;
    if (this.enableAnimation)
    if (this.animator)
    this.animator.stop();
    this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, false, { duration: this.duration, fps: this.fps, transition: this.transition });
    this.animator.start();
    else
    this.setDisplay(this.getContent(), "none");
    this.removeClassName(this.element, this.openClass);
    this.addClassName(this.element, this.closedClass);
    Spry.Widget.CollapsiblePanel.prototype.onTabClick = function(e)
    if (this.isOpen())
    this.close();
    else
    this.open();
    this.focus();
    return this.stopPropagation(e);
    Spry.Widget.CollapsiblePanel.prototype.onFocus = function(e)
    this.hasFocus = true;
    this.addClassName(this.element, this.focusedClass);
    return false;
    Spry.Widget.CollapsiblePanel.prototype.onBlur = function(e)
    this.hasFocus = false;
    this.removeClassName(this.element, this.focusedClass);
    return false;
    Spry.Widget.CollapsiblePanel.KEY_UP = 38;
    Spry.Widget.CollapsiblePanel.KEY_DOWN = 40;
    Spry.Widget.CollapsiblePanel.prototype.onKeyDown = function(e)
    var key = e.keyCode;
    if (!this.hasFocus || (key != this.openPanelKeyCode && key != this.closePanelKeyCode))
    return true;
    if (this.isOpen() && key == this.closePanelKeyCode)
    this.close();
    else if ( key == this.openPanelKeyCode)
    this.open();
    return this.stopPropagation(e);
    Spry.Widget.CollapsiblePanel.prototype.stopPropagation = function(e)
    if (e.preventDefault) e.preventDefault();
    else e.returnValue = false;
    if (e.stopPropagation) e.stopPropagation();
    else e.cancelBubble = true;
    return false;
    Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers = function()
    var tab = this.getTab();
    if (!tab)
    return;
    var self = this;
    Spry.Widget.CollapsiblePanel.addEventListener(tab, "click", function(e) { return self.onTabClick(e); }, false);
    Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseover", function(e) { return self.onTabMouseOver(e); }, false);
    Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseout", function(e) { return self.onTabMouseOut(e); }, false);
    if (this.enableKeyboardNavigation)
    // XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
    // rely on adding the tabindex attribute if it is missing to enable keyboard navigation
    // by default.
    // Find the first element within the tab container that has a tabindex or the first
    // anchor tag.
    var tabIndexEle = null;
    var tabAnchorEle = null;
    this.preorderTraversal(tab, function(node) {
    if (node.nodeType == 1 /* NODE.ELEMENT_NODE */)
    var tabIndexAttr = tab.attributes.getNamedItem("tabindex");
    if (tabIndexAttr)
    tabIndexEle = node;
    return true;
    if (!tabAnchorEle && node.nodeName.toLowerCase() == "a")
    tabAnchorEle = node;
    return false;
    if (tabIndexEle)
    this.focusElement = tabIndexEle;
    else if (tabAnchorEle)
    this.focusElement = tabAnchorEle;
    if (this.focusElement)
    Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "focus", function(e) { return self.onFocus(e); }, false);
    Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "blur", function(e) { return self.onBlur(e); }, false);
    Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "keydown", function(e) { return self.onKeyDown(e); }, false);
    Spry.Widget.CollapsiblePanel.addEventListener = function(element, eventType, handler, capture)
    try
    if (element.addEventListener)
    element.addEventListener(eventType, handler, capture);
    else if (element.attachEvent)
    element.attachEvent("on" + eventType, handler);
    catch (e) {}
    Spry.Widget.CollapsiblePanel.prototype.preorderTraversal = function(root, func)
    var stopTraversal = false;
    if (root)
    stopTraversal = func(root);
    if (root.hasChildNodes())
    var child = root.firstChild;
    while (!stopTraversal && child)
    stopTraversal = this.preorderTraversal(child, func);
    try { child = child.nextSibling; } catch (e) { child = null; }
    return stopTraversal;
    Spry.Widget.CollapsiblePanel.prototype.attachBehaviors = function()
    var panel = this.element;
    var tab = this.getTab();
    var content = this.getContent();
    if (this.contentIsOpen || this.hasClassName(panel, this.openClass))
    this.addClassName(panel, this.openClass);
    this.removeClassName(panel, this.closedClass);
    this.setDisplay(content, "block");
    this.contentIsOpen = true;
    else
    this.removeClassName(panel, this.openClass);
    this.addClassName(panel, this.closedClass);
    this.setDisplay(content, "none");
    this.contentIsOpen = false;
    this.attachPanelHandlers();
    Spry.Widget.CollapsiblePanel.prototype.getTab = function()
    return this.getElementChildren(this.element)[0];
    Spry.Widget.CollapsiblePanel.prototype.getContent = function()
    return this.getElementChildren(this.element)[1];
    Spry.Widget.CollapsiblePanel.prototype.isOpen = function()
    return this.contentIsOpen;
    Spry.Widget.CollapsiblePanel.prototype.getElementChildren = function(element)
    var children = [];
    var child = element.firstChild;
    while (child)
    if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
    children.push(child);
    child = child.nextSibling;
    return children;
    Spry.Widget.CollapsiblePanel.prototype.focus = function()
    if (this.focusElement && this.focusElement.focus)
    this.focusElement.focus();
    Spry.Widget.CollapsiblePanel.PanelAnimator = function(panel, doOpen, opts)
    this.timer = null;
    this.interval = 0;
    this.fps = 60;
    this.duration = 500;
    this.startTime = 0;
    this.transition = Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition;
    this.onComplete = null;
    this.panel = panel;
    this.content = panel.getContent();
    this.doOpen = doOpen;
    Spry.Widget.CollapsiblePanel.setOptions(this, opts, true);
    this.interval = Math.floor(1000 / this.fps);
    var c = this.content;
    var curHeight = c.offsetHeight ? c.offsetHeight : 0;
    this.fromHeight = (doOpen && c.style.display == "none") ? 0 : curHeight;
    if (!doOpen)
    this.toHeight = 0;
    else
    if (c.style.display == "none")
    // The content area is not displayed so in order to calculate the extent
    // of the content inside it, we have to set its display to block.
    c.style.visibility = "hidden";
    c.style.display = "block";
    // Clear the height property so we can calculate
    // the full height of the content we are going to show.
    c.style.height = "";
    this.toHeight = c.offsetHeight;
    this.distance = this.toHeight - this.fromHeight;
    this.overflow = c.style.overflow;
    c.style.height = this.fromHeight + "px";
    c.style.visibility = "visible";
    c.style.overflow = "hidden";
    c.style.display = "block";
    Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition = function(time, begin, finish, duration) { time /= duration; return begin + ((2 - time) * time * finish); };
    Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start = function()
    var self = this;
    this.startTime = (new Date).getTime();
    this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop = function()
    if (this.timer)
    clearTimeout(this.timer);
    // If we're killing the timer, restore the overflow property.
    this.content.style.overflow = this.overflow;
    this.timer = null;
    Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation = function()
    var curTime = (new Date).getTime();
    var elapsedTime = curTime - this.startTime;
    if (elapsedTime >= this.duration)
    if (!this.doOpen)
    this.content.style.display = "none";
    this.content.style.overflow = this.overflow;
    this.content.style.height = this.toHeight + "px";
    if (this.onComplete)
    this.onComplete();
    return;
    var ht = this.transition(elapsedTime, this.fromHeight, this.distance, this.duration);
    this.content.style.height = ((ht < 0) ? 0 : ht) + "px";
    var self = this;
    this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.CollapsiblePanelGroup = function(element, opts)
    this.element = this.getElement(element);
    this.opts = opts;
    this.attachBehaviors();
    Spry.Widget.CollapsiblePanelGroup.prototype.setOptions = Spry.Widget.CollapsiblePanel.prototype.setOptions;
    Spry.Widget.CollapsiblePanelGroup.prototype.getElement = Spry.Widget.CollapsiblePanel.prototype.getElement;
    Spry.Widget.CollapsiblePanelGroup.prototype.getElementChildren = Spry.Widget.CollapsiblePanel.prototype.getElementChildren;
    Spry.Widget.CollapsiblePanelGroup.prototype.setElementWidget = function(element, widget)
    if (!element || !widget)
    return;
    if (!element.spry)
    element.spry = new Object;
    element.spry.collapsiblePanel = widget;
    Spry.Widget.CollapsiblePanelGroup.prototype.getElementWidget = function(element)
    return (element && element.spry && element.spry.collapsiblePanel) ? element.spry.collapsiblePanel : null;
    Spry.Widget.CollapsiblePanelGroup.prototype.getPanels = function()
    if (!this.element)
    return [];
    return this.getElementChildren(this.element);
    Spry.Widget.CollapsiblePanelGroup.prototype.getPanel = function(panelIndex)
    return this.getPanels()[panelIndex];
    Spry.Widget.CollapsiblePanelGroup.prototype.attachBehaviors = function()
    if (!this.element)
    return;
    var cpanels = this.getPanels();
    var numCPanels = cpanels.length;
    for (var i = 0; i < numCPanels; i++)
    var cpanel = cpanels[i];
    this.setElementWidget(cpanel, new Spry.Widget.CollapsiblePanel(cpanel, this.opts));
    Spry.Widget.CollapsiblePanelGroup.prototype.openPanel = function(panelIndex)
    var w = this.getElementWidget(this.getPanel(panelIndex));
    if (w && !w.isOpen())
    w.open();
    Spry.Widget.CollapsiblePanelGroup.prototype.closePanel = function(panelIndex)
    var w = this.getElementWidget(this.getPanel(panelIndex));
    if (w && w.isOpen())
    w.close();
    Spry.Widget.CollapsiblePanelGroup.prototype.openAllPanels = function()
    var cpanels = this.getPanels();
    var numCPanels = cpanels.length;
    for (var i = 0; i < numCPanels; i++)
    var w = this.getElementWidget(cpanels[i]);
    if (w && !w.isOpen())
    w.open();
    Spry.Widget.CollapsiblePanelGroup.prototype.closeAllPanels = function()
    var cpanels = this.getPanels();
    var numCPanels = cpanels.length;
    for (var i = 0; i < numCPanels; i++)
    var w = this.getElementWidget(cpanels[i]);
    if (w && w.isOpen())
    w.close();
    })(); // EndSpryComponent

    I have inserted a spry collapsible panel into my website, made ZERO
    adjustments to any of the scripting or even css styling
    That is good, that means that I have a local copy of the scripting and css files eliminating the need to attach the code to a post.
    Is something wrong with the js file? I tried the panel earlier on a
    different site on the same computer and it was working fine
    The fact that it works on a different site means that something is correct. My assumption is that the scripting and css files are doing their job correctly and to answer your question regarding the js file, no.
    Having eliminated the Spry original JavaScript and CSS files as being the culprits, there must be a problem with the rest of the site, incorrect HTML, other interfering JavaScript or CSS.
    I can keep guessing, but only those persons that are privy to your code can give you any positive input. Please find a way to upload your files so that we can see the code in context.
    To this end, screen captures do not assist in solving the problem, they only add to others' amusement at seeing the problem.
    Ben
    PS I forgot to say, welcome to our community and yes I am a cynical old codger, sorry.

  • Collapsible panel problem in IE

    Hi ,
    I have a collapsible panel in a site I'm working on.the collapsible panel on display is closed. whe  I open the page in IE8 it looks fine but once I click on the panel to open the content is show as it should and after a sec it drops down to the bottom of the web page.
    is this a problem with the way I implimented the spry collapsible panel or with IE8? on FF, Opera and Safari it opens just fine.

    Source Code:
    <div class="IntBodyDiv1">
        <img src="../IMG/vertical-line.png" width="1" height="407" align="right" />
        <div id="Applications" class="CollapsiblePanel">
          <div class="CollapsiblePanelTab" tabindex="0">
    <table width="200" border="0" cellspacing="5" cellpadding="1">
      <tr>
        <td>Applications</td>
      </tr>
      <tr>
        <td><img src="../IMG/line.png" width="169" height="1" /></td>
      </tr>
    </table>
          </div>
          <div class="CollapsiblePanelContent">
            <table width="201" border="0" cellspacing="5" cellpadding="1">
              <tr>
                <td><span class="SideMenuH2"><a href="#">Private Pools</a></span></td>
              </tr>
              <tr>
                <td><span class="SideMenuH2"><a href="#">Public Pools</a></span></td>
              </tr>
              <tr>
                <td><span class="SideMenuH2"><a href="#">Spas</a></span></td>
              </tr>
              <tr>
                <td><span class="SideMenuH2"><a href="#">Rehabilitation & Thermal pools
                </a></span></td>
              </tr>
            </table>
          </div>
        </div>
        <div id="Productss" class="CollapsiblePanel">
          <div class="CollapsiblePanelTab" id="Products" tabindex="0">
    <table width="200" border="0" cellspacing="5" cellpadding="1">
      <tr>
        <td>Products</td>
      </tr>
      <tr>
        <td><img src="../IMG/line.png" width="169" height="1" /></td>
      </tr>
    </table>
          </div>
          <div class="CollapsiblePanelContent">
            <table width="201" border="0" cellpadding="1" cellspacing="5" class="SideMenuH2">
              <tr>
                <td><a href="#">Prizma</a></td>
              </tr>
              <tr>
                <td><a href="#">HG 302</a></td>
              </tr>
              <tr>
                <td><a href="#">HG 202</a></td>
              </tr>
              <tr>
                <td><a href="#">HG 102</a></td>
              </tr>
              <tr>
                <td><a href="#">HG CYA</a></td>
              </tr>
            </table>
          </div>
        </div>
        <p><br />
      </p>
      </div>
      <div class="IntBodyDiv2">
    sprycollapsiblepanel.css:
    @charset "UTF-8";
    /* SpryCollapsiblePanel.css - version 0.5 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    /* This is the selector for the main CollapsiblePanel container. For our
    * default style, the CollapsiblePanel is responsible for drawing the borders
    * around the widget.
    * If you want to constrain the width of the CollapsiblePanel widget, set a width on
    * the CollapsiblePanel container. By default, our CollapsiblePanel expands horizontally to fill
    * up available space.
    * The name of the class ("CollapsiblePanel") used in this selector is not necessary
    * to make the widget function. You can use any class name you want to style the
    * CollapsiblePanel container.
    .CollapsiblePanel {
    margin: 0px;
    padding: 0px;
    width: 196px;
    /* This is the selector for the CollapsiblePanelTab. This container houses
    * the title for the panel. This is also the container that the user clicks
    * on to open or close the panel.
    * The name of the class ("CollapsiblePanelTab") used in this selector is not necessary
    * to make the widget function. You can use any class name you want to style an
    * CollapsiblePanel panel tab container.
    .CollapsiblePanelTab {
    margin: 0px;
    padding: 2px;
    cursor: pointer;
    -khtml-user-select: none;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 15px;
    font-weight: bold;
    color: #00aeef;
    outline: none;
    /* This is the selector for a CollapsiblePanel's Content area. It's important to note that
    * you should never put any padding on the content area element if you plan to
    * use the CollapsiblePanel's open/close animations. Placing a non-zero padding on the content
    * element can cause the CollapsiblePanel to abruptly grow in height while the panels animate.
    * The name of the class ("CollapsiblePanelContent") used in this selector is not necessary
    * to make the widget function. You can use any class name you want to style a
    * CollapsiblePanel content container.
    .CollapsiblePanelContent {
    margin: 0px;
    padding: 0px;
    /* An anchor tag can be used inside of a CollapsiblePanelTab so that the
    * keyboard focus ring appears *inside* the tab instead of around the tab.
    * This is an example of how to make the text within the anchor tag look
    * like non-anchor (normal) text.
    .CollapsiblePanelTab a {
    color: black;
    text-decoration: none;
    margin: 0px;
    padding: 0px;
    outline: none;
    /* This is an example of how to change the appearance of the panel tab that is
    * currently open. The class "CollapsiblePanelOpen" is programatically added and removed
    * from panels as the user clicks on the tabs within the CollapsiblePanel.
    .CollapsiblePanelOpen .CollapsiblePanelTab {
    /* This is an example of how to change the appearance of the panel tab when the
    * CollapsiblePanel is closed. The "CollapsiblePanelClosed" class is programatically added and removed
    * whenever the CollapsiblePanel is closed.
    .CollapsiblePanelClosed .CollapsiblePanelTab {
    margin: 0px;
    padding: 0px;
    /* background-color: #EFEFEF */
    /* This is an example of how to change the appearance of the panel tab as the
    * mouse hovers over it. The class "CollapsiblePanelTabHover" is programatically added
    * and removed from panel tab containers as the mouse enters and exits the tab container.
    .CollapsiblePanelTabHover,  .CollapsiblePanelOpen .CollapsiblePanelTabHover {
    margin: 0px;
    padding: 0px;
    /* This is an example of how to change the appearance of all the panel tabs when the
    * CollapsiblePanel has focus. The "CollapsiblePanelFocused" class is programatically added and removed
    * whenever the CollapsiblePanel gains or loses keyboard focus.
    .CollapsiblePanelFocused .CollapsiblePanelTab {
    margin: 0px;
    padding: 0px;

  • af:quickQuery panel Problem

    Hi All,
    I am using jdeveloper 11 g version 11.1.1.4.0
    I have some issues with <af:quickQuery> panel.
    I have created to pages i.e A and B.
    On page "A" I have taken table with qucikQuery Search.
    on these page "A" When user do some searching it show correct answer.
    But when user leave the Page "A" and go to page "B" i.e from A->B.
    and come back to page "A" i.e B->A
    at that time what ever user had typed in the search InputText it remain as it is.
    But in my case I doesn't what that previous value.
    And I want that inputText be empty.
    So please help me resolve these problem.
    Thank's & Regard's,
    Dilkhush

    JDeveloper 11.1.1.4.0
    Further to what I've specified,
    I set the CacheResults="false" for iterator.
    And refresh="Always" for the searchRegion
    This ensures that data is not retained on subsequent visits to the page. However, the CriterionValue gets reset, every time search is executed. Tried for different values of refresh specified in the documentation, but could not find any solution.
    Presently trying refreshCondition for searchRegion. Not sure what should be specified there though.
    Regards,
    Amar

  • Java Applet Panel problems with CardLayout

    Hi, I have a problem a I have been stucked for 2 days.
    I created 3 Panels to use with CardLayout. I would switch between those 3 panels depending on user interaction. I have some textfields and text areas on the 2nd and 3rd Panel. On the 1st panel, I would like to use g.drawstring to write some stuff on that panel, but the words would be blocked off if it goes to where the components are on the other panels.
    Thanks.

    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    public class CardTest extends Applet
        Panel panel;
        CardLayout cards;
        public void init()
        {   cards = new CardLayout();
            panel = new Panel(cards);
            panel.add("one", new GraphicPanel());
            panel.add("two", getPanel("panel two"));
            panel.add("three", getPanel("panel three"));
            setLayout(new BorderLayout());
            add(getNavPanel(), "North");
            add(panel);
        private Panel getNavPanel()
            final Button
                last = new Button("last"),
                next = new Button("next");
            ActionListener l = new ActionListener()
                public void actionPerformed(ActionEvent e)
                    Button button = (Button)e.getSource();
                    if(button == last)
                        cards.previous(panel);
                    if(button == next)
                        cards.next(panel);
            last.addActionListener(l);
            next.addActionListener(l);
            Panel panel = new Panel();
            panel.add(last);
            panel.add(next);
            return panel;
        private Panel getPanel(String s)
            Panel panel = new Panel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.weighty = 1.0;
            gbc.gridwidth = GridBagConstraints.REMAINDER;
            panel.add(new Button("button"), gbc);
            panel.add(new TextArea(s, 8, 16), gbc);
            return panel;
        public static void main(String[] args)
            Applet applet = new CardTest();
            Frame f = new Frame();
            f.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent e)
                    System.exit(0);
            f.add(applet);
            f.setSize(400,400);
            f.setLocation(200,200);
            applet.init();
            f.setVisible(true);
    class GraphicPanel extends Panel
        Font font;
        String text;
        final int PAD = 25;
        public GraphicPanel()
            font = new Font("lucida bright regular", Font.PLAIN, 22);
            text = "Hello World";
        public void paint(Graphics g)
            super.paint(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            int dia = Math.min(w,h)/6;
            g2.setPaint(Color.blue);
            g2.drawLine(PAD, PAD, w - PAD, PAD);
            g2.drawLine(PAD, h - PAD, w - PAD, h - PAD);
            g2.setPaint(Color.green.darker());
            g2.drawOval(w/2 - dia/2, h*2/3, dia, dia);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            float width = (float)font.getStringBounds(text, frc).getWidth();
            LineMetrics lm = font.getLineMetrics(text, frc);
            float x = (w - width)/2;
            float y = (h + lm.getHeight())/2 -lm.getDescent();
            g2.setPaint(Color.black);
            g2.drawString(text, x, y);
    }

  • Folio builder panel problem on login

    Updated my folio builder panel and now when I login it tells me I have to update eventhough I just did. Am I the only one with this problem? T.

    Hi John!  You mentioned that it will be down the evening of March 12th, do you have any idea what time? We'd like to keep working and uploading content, but want to make sure that we don't screw anything up. Thanks!

  • Preflight Panel Problem!

    Indesign CS5
    In the lower status bar preflight reports 3 errors and there is a red dot. When I click on the tab to bring up the preflight panel, the panel is blank and doesn't specify the errors. I tried loading other preflight profiles but the panel remains blank.
    Haven't had any luck finding an answer to this problem.
    Any one else experienced something similar? Solutions?
    Thanks!

    Try restoring your InDesign preferences:
    http://forums.adobe.com/thread/526990

  • One Components into 2 different panel problems

    Hi,
    I have one component, just call it A, and 2 different
    panels just call it PA and PB.
    I put A into PA and then I put A into PB,
    and display PA & PB into screen together.
    The problem is A is missing in PA but displayed
    into PB. I know this is behavior of AWT/Swing,
    but maybe some of you know how to solve
    this problem without creating two instances of A.
    Thank you in advance...

    You could make something like this:
    public class multicomponent
         Vector activecomponents=new Vector
         //all methods you intend to use on this component this way
         public method(somearg arg)
               for //all c in vector
                   c.method(arg);
          public void addto(Container co)
               comp=new yourcomponent();
               co.add(comp);
               activecomponents.add(comp);
    }You can enhance that by using weak references for the elements in the vector and you will have to think what to do for get methods.

  • Sliding Panels Problem: Content panels with different width?

    I'm trying to create the exact same behaviour as this Argentinian Photographer have done:
    http://germansaezphoto.com/music/radiohead/
    I've read and used the files in your tutorial: http://www.adobe.com/devnet/dreamweaver/articles/sliding_panel.html
    and searched the forum but couldn't find an answer.
    I'm almost there. The problem is that I have 6 test photos that are of the same height (and the same height as the slidingpanel view port) but different in width. If I set the class .SlidingPanelsContent to the same width as the largest picture(i.e. panel) then it creates a white space until the next pic starts. And If I set the width to the same as the smallest picture then it crops the other ones.
    Here is the div in the index file:
    <div class="SlidingPanels" id="panelwidget">
      <div class="SlidingPanelsContentGroup">
        <div class="SlidingPanelsContent" <img src="images/panel-2.jpg" width="645" height="430" /></div>
        <div class="SlidingPanelsContent" <img src="images/panel-1.jpg" width="594" height="430" /></div>
      <div class="SlidingPanelsContent" <img src="images/panel-3.jpg" width="645" height="430" /></div>
      <div class="SlidingPanelsContent" <img src="images/panel-4.jpg" width="645" height="430" /></div>
      <div class="SlidingPanelsContent" <img src="images/panel-5.jpg" width="645" height="430" /></div>
      <div class="SlidingPanelsContent" <img src="images/panel-6.jpg" width="594" height="430" /></div>
      </div>
      </div><br />
      <a href="#" onclick="sp1.showFirstPanel();">First Panel</a> | <a
        href="#" onclick="sp1.showPreviousPanel();">Previous Panel</a> |
    <a href="#" onclick="sp1.showNextPanel();">Next Panel</a> | <a href="#"
        onclick="sp1.showLastPanel();">Last Panel</a>
      <script type="text/javascript">
    var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
    </script>
    And here is the classes in the css:
    .SlidingPanels {
         position: relative;
         float: left;
         width: 1000px;
         height: 430px;
         padding: 0px;
         border: none;
    .SlidingPanelsContentGroup {
         position: relative;
         float: left;
         width: 10000px;
         margin: 0px;
         padding: 0px;
         min-height:0;
         border: none;
    .SlidingPanelsContent {
         width: 645px;
         height: 430px;
         float: left;
         overflow: hidden;
         margin: 0px;
         padding: 0px;
         border: none;
    In the css file before the .SlidingPanelsContent class Adobe states that they in their default implementation has set the width to the same as the view port to ensure that only one panel at a time can be viewed within the view port. But I want the opposite.
    How do I solve this?

    It seems to me that if you have all different width images, you will want to remove the width from the content pane. That should allow the images to butt up next to each other without either extra white space (for smaller images) or cropping (of larger images). Saenz's photos are in divs with a class of .panelfoto that has the definition of float: left; width: auto;
    I have not played around a lot with sliding panels, but it seems reasonable to me that that would work.
    You have probably already read and digested this page: http://labs.adobe.com/technologies/spry/articles/sliding_panels/index.html
    You know, if you really want something very close to what the example site looks like, look into his code and imitate it.
    It does not appear that every move of the pane goes the same distance, and I'm not sure what controls that, but I see some of his images moving part-way, exposing part of the next, and so forth, instead of a complete image change each time. Using different width photos will do that partly, of course.
    Beth

  • JTabbed Pane Problem

    I have this problem,i add the following 3 JPanels to the JTabbedPane but when i display the JTabbedPane in the GUI,the first tab is selected by default at the start,The 3 tabs overlap for some reason(you can see all the data form the 3 tabs behind the tab in front),If i select all the tabs then they go back to normal,is there anyway you know know to fix this.
         public setFieldNames()
              super();
              gb1 = new GridBagLayout();
              gbc = new GridBagConstraints();
              setLayout(gb1);
              mainHeadingSection = new createMainOptionPanel(this);
              otherOptionsSection = new createNextOptionPanel(this);
              prodVersionSection = new createProductVersionPanel(this);
              createExitInputAndSubmit();
              buttonSection.setLayout(gb1);
              createButtonSection();
              buttonSection.setMinimumSize(new Dimension(400,700));
              buttonSection.setPreferredSize(new Dimension(400,700));
              //buttonSection.setBackground(lightBlue);
              fileListSection.setLayout(gb1);
              createFileListSection();
              fileListSection.setMinimumSize(new Dimension(300,200));
              fileListSection.setPreferredSize(new Dimension(300,200));
              //fileListSection.setBackground(lightBlue1);
              theTabbedPanel = new JPanel();
    tabbedPane = new JTabbedPane(JTabbedPane.BOTTOM);
    tabbedPane.setSize(400,700);
    tabbedPane.addTab("Main Options", mainHeadingSection);
    tabbedPane.addTab("Options ", otherOptionsSection);
    tabbedPane.addTab(" Product Version ", prodVersionSection);
    theTabbedPanel.add(tabbedPane);
              theTabbedPanel.setMinimumSize(new Dimension(400,700));
              theTabbedPanel.setPreferredSize(new Dimension(400,700));
              addComp(theTabbedPanel,                         this,gb1,gbc,0,1,1,1,1,1,gbc.NORTH);
              addComp(buttonSection,                         this,gb1,gbc,0,0,1,1,1,1,gbc.NORTH);
              tabbedPane.setSelectedIndex(0);
         }

    I guess the problem is that you explictly set a size for each tab, and the JTabbedPane. If you let a LayoutManager do this for you the JTabbedPane will automaticly choose a size for itself and the panels that you add, so that all the panels get an equal size, just large enough that all the panels completely overlap.
    So I guess you can just remove/comment out the lines where you set the minimum/preferred size for you panels and the tabbedpane.
    Don't forget to call pack() on the window/JFrame where you add your components

  • Jtabbed pane problem + flags printout

    Hi,
    I am having difficulty displaying a JTabbedPane which is contained by a dialog. When I display the Dialog for the first time the Tabbed displays perfectly - anytime after that it disappears.
    I found this really strange so I put in some printout statements for the JTabbed pane here's what I got
    When it displays the prinout for the JTabbed pane is ............................
    extCellTabbedPane
    rnh.adj.cellhandovermgt.gui.refactor.ExtCellTabbedPane[,0,0,0x0,invalid,layout=javax.swi
    ng.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX=null,alignmentY=null
    ,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,haveRegistered=false,t
    abPlacement=TOP]
    When it does n't display the prinout for the JTabbedPane is
    rnh.adjcellhandovermgt.gui.refactor.ExtCellTabbedPane[,0,67,193x45,inv
    alid,layout=javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX
    =null,alignmentY=null,border=,flags=16,maximumSize=,minimumSize=,preferredSize=,
    haveRegistered=false,tabPlacement=TOP]
    What I am interested in is the meaning of the parameter flags. In one case it is 0 and in one case it is 16? What does this parameter mean? Where I can get some information on this as I think this will tell me what is happening to the JTabbedPane.
    Thank you in Advance
    Alex

    The flags item reflect the flags value in JComponent
    class. It represents several status
    of the component:
    REQUEST_FOCUS_DISABLE
    IS_DOUBLE_BUFFERED
    ANCESTOR_USING_BUFFER
    IS_PAINTING_TITLE
    HAS_FOCUS
    IS_OPAQUE
    As my understand about your problem, this may be no
    help for you to locate the error
    As the message you post, you might use a third
    implementation of JTabbedPane, so the
    problem might be in the implementation. I
    have used JTabbedPane often with no error
    like you say :)
    Hope this Helps!Thanks for your help here - I would like more information if possible i.e. a numerical mapping for each property - do you know where I could get this. I don't really understand what you mean about the Third implementation. Do you mean simply extend the JTabbedPane? Thisis what I do but I don't really know what part to change to stop it disappearing. Thanks once again. Anymore help would be greatly appreciated.

  • Spry Tabbed Panel Problem

    Thanks in advance to anyone who can help. I'm having a problem with my spry tabbed panel. It works but the actual CSS isn't working on the spry. The panel goes down onto the content.
    Here is a screen cap: http://img32.imageshack.us/img32/2598/53451133.jpg
    Coding:
    @charset "UTF-8";
    /* SpryTabbedPanels.css - version 0.4 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    /* Horizontal Tabbed Panels
    * The default style for a TabbedPanels widget places all tab buttons
    * (left aligned) above the content panel.
    /* This is the selector for the main TabbedPanels container. For our
    * default style, this container does not contribute anything visually,
    * but it is floated left to make sure that any floating or clearing done
    * with any of its child elements are contained completely within the
    * TabbedPanels container, to minimize any impact or undesireable
    * interaction with other floated elements on the page that may be used
    * for layout.
    * If you want to constrain the width of the TabbedPanels widget, set a
    * width on the TabbedPanels container. By default, the TabbedPanels widget
    * expands horizontally to fill up available space.
    * The name of the class ("TabbedPanels") used in this selector is not
    * necessary to make the widget function. You can use any class name you
    * want to style the TabbedPanels container.
    .TabbedPanels {
        margin: 0px;
        padding: 0px;
        float: left;
        clear: none;
        width: 100%; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/
    /* This is the selector for the TabGroup. The TabGroup container houses
    * all of the tab buttons for each tabbed panel in the widget. This container
    * does not contribute anything visually to the look of the widget for our
    * default style.
    * The name of the class ("TabbedPanelsTabGroup") used in this selector is not
    * necessary to make the widget function. You can use any class name you
    * want to style the TabGroup container.
    .TabbedPanelsTabGroup {
        margin: 0px;
        padding: 0px;
    /* This is the selector for the TabbedPanelsTab. This container houses
    * the title for the panel. This is also the tab "button" that the user clicks
    * on to activate the corresponding content panel so that it appears on top
    * of the other tabbed panels contained in the widget.
    * For our default style, each tab is positioned relatively 1 pixel down from
    * where it wold normally render. This allows each tab to overlap the content
    * panel that renders below it. Each tab is rendered with a 1 pixel bottom
    * border that has a color that matches the top border of the current content
    * panel. This gives the appearance that the tab is being drawn behind the
    * content panel.
    * The name of the class ("TabbedPanelsTab") used in this selector is not
    * necessary to make the widget function. You can use any class name you want
    * to style this tab container.
    .TabbedPanelsTab {
        position: relative;
        top: 1px;
        float: left;
        padding: 4px 10px;
        margin: 0px 1px 0px 0px;
        font: bold 0.7em sans-serif;
        background-color: #DDD;
        list-style: none;
        border-left: solid 1px #CCC;
        border-bottom: solid 1px #999;
        border-top: solid 1px #999;
        border-right: solid 1px #999;
        -moz-user-select: none;
        -khtml-user-select: none;
        cursor: pointer;
    /* This selector is an example of how to change the appearnce of a tab button
    * container as the mouse enters it. The class "TabbedPanelsTabHover" is
    * programatically added and removed from the tab element as the mouse enters
    * and exits the container.
    .TabbedPanelsTabHover {
        background-color: #CCC;
    /* This selector is an example of how to change the appearance of a tab button
    * container after the user has clicked on it to activate a content panel.
    * The class "TabbedPanelsTabSelected" is programatically added and removed
    * from the tab element as the user clicks on the tab button containers in
    * the widget.
    * As mentioned above, for our default style, tab buttons are positioned
    * 1 pixel down from where it would normally render. When the tab button is
    * selected, we change its bottom border to match the background color of the
    * content panel so that it looks like the tab is part of the content panel.
    .TabbedPanelsTabSelected {
        background-color: #EEE;
        border-bottom: 1px solid #EEE;
    /* This selector is an example of how to make a link inside of a tab button
    * look like normal text. Users may want to use links inside of a tab button
    * so that when it gets focus, the text *inside* the tab button gets a focus
    * ring around it, instead of the focus ring around the entire tab.
    .TabbedPanelsTab a {
        color: black;
        text-decoration: none;
    /* This is the selector for the ContentGroup. The ContentGroup container houses
    * all of the content panels for each tabbed panel in the widget. For our
    * default style, this container provides the background color and borders that
    * surround the content.
    * The name of the class ("TabbedPanelsContentGroup") used in this selector is
    * not necessary to make the widget function. You can use any class name you
    * want to style the ContentGroup container.
    .TabbedPanelsContentGroup {
        clear: both;
        border-left: solid 1px #CCC;
        border-bottom: solid 1px #CCC;
        border-top: solid 1px #999;
        border-right: solid 1px #999;
        background-color: #EEE;
    /* This is the selector for the Content panel. The Content panel holds the
    * content for a single tabbed panel. For our default style, this container
    * provides some padding, so that the content is not pushed up against the
    * widget borders.
    * The name of the class ("TabbedPanelsContent") used in this selector is
    * not necessary to make the widget function. You can use any class name you
    * want to style the Content container.
    .TabbedPanelsContent {
        padding: 4px;
    /* This selector is an example of how to change the appearnce of the currently
    * active container panel. The class "TabbedPanelsContentVisible" is
    * programatically added and removed from the content element as the panel
    * is activated/deactivated.
    .TabbedPanelsContentVisible {
    /* Vertical Tabbed Panels
    * The following rules override some of the default rules above so that the
    * TabbedPanels widget renders with its tab buttons along the left side of
    * the currently active content panel.
    * With the rules defined below, the only change that will have to be made
    * to switch a horizontal tabbed panels widget to a vertical tabbed panels
    * widget, is to use the "VTabbedPanels" class on the top-level widget
    * container element, instead of "TabbedPanels".
    /* This selector floats the TabGroup so that the tab buttons it contains
    * render to the left of the active content panel. A border is drawn around
    * the group container to make it look like a list container.
    .VTabbedPanels .TabbedPanelsTabGroup {
        float: left;
        width: 10em;
        height: 20em;
        background-color: #EEE;
        position: absolute;
        border-top: solid 1px #999;
        border-right: solid 1px #999;
        border-left: solid 1px #CCC;
        border-bottom: solid 1px #CCC;
    /* This selector disables the float property that is placed on each tab button
    * by the default TabbedPanelsTab selector rule above. It also draws a bottom
    * border for the tab. The tab button will get its left and right border from
    * the TabGroup, and its top border from the TabGroup or tab button above it.
    .VTabbedPanels .TabbedPanelsTab {
        float: none;
        margin: 0px;
        border-top: none;
        border-left: none;
        border-right: none;
    /* This selector disables the float property that is placed on each tab button
    * by the default TabbedPanelsTab selector rule above. It also draws a bottom
    * border for the tab. The tab button will get its left and right border from
    * the TabGroup, and its top border from the TabGroup or tab button above it.
    .VTabbedPanels .TabbedPanelsTabSelected {
        background-color: #EEE;
        border-bottom: solid 1px #999;
    /* This selector floats the content panels for the widget so that they
    * render to the right of the tabbed buttons.
    .VTabbedPanels .TabbedPanelsContentGroup {
        clear: none;
        float: left;
        padding: 0px;
        width: 30em;
        height: 20em;

    Hi Ben,
    I creat a new page ( a simple page...):
    http://dev.achab.it/test/test.htm
    Our web-graphics are insert into
    <script type="text/javascript" src="../common/js_func/parameters.js"></script>
    the SpryTabbedPanels.js scripts.
    On the new simple, you can click to 4 Tabs on the left.
    If you want to see the 5 or 6 content tab you can click the label into the 3 or 5 content tab.
    When you click on the label "here" on the 3° Tab (for example), you can see the content change and the "Tab 3" is not selected.
    I'd like to change the content and leave the "Tab 3" selected.
    I hope in your help :-)
    thank in advance
    regards
    Stefano

Maybe you are looking for

  • L2TP | Logon Failure with domain name but success with .local

    Hi, I am trying to use L2TP and failing. When trying within the work LAN using myserver.local it works a treat. When I try myserver.company.co.uk it asks me to log-in then fails with a very brief message giving nothing away. I managed to get PPTP to

  • Header line problem inside BADI method

    Hi all, I have to use a function CLAF_CLASSIFICTION_OF_OBJECTS' inside a BADI called BATCH_Master. Now the thing is that the data which I have to read gets fetched in one of the tables of function module. Following CODE works fine if <b>I am not usin

  • Hw do I reset type size in palette (CS4)?

    For some reason or some manipulation I wasn't aware of, my Type palette now displays font size in inches. For instance, if I type in "12 pt" it automatically enters "0.167 in". I have tried resetting the panel, visited Preferences, but can't seem to

  • Related to reports

    hi all, this is my code... DATA:BEGIN OF itab OCCURS 0,      lifnr LIKE lfa1-lifnr,      name1 LIKE lfa1-name1,      END OF itab. TYPE-POOLS:slis. DATA:repid LIKE sy-repid. DATA:f_lfa11 TYPE slis_t_fieldcat_alv,      f_lfa1 TYPE slis_fieldcat_alv. re

  • Imac ical cannot connect to server

    I have an imac, iphone, ipad, and mobile me.  I mistakenly deleted some info in my key chain.  Now calender events put in my iphone will not show up in imac calendar.  They do show up in the mobile me calendar and the ipad calender. I get a message o