Multiple JPanels, non-working JScrollPane

So, I'm trying to make a scrollbar with multiple text areas, but I can't seem to get the scroll bar to appear when there's overflow. When I try, [this is an example of what I get|http://www.fileden.com/files/2010/3/9/2788777//scrollpane.png].
Here is my code:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.KeyboardFocusManager;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.ScrollPaneConstants;
public class SSCCE
     public SSCCE()
          JFrame f = new JFrame();
          JPanel p[] = {new JPanel(),new JPanel()};
          JScrollPane pane = new JScrollPane(p[0],ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
          p[0].setLayout(new GridBagLayout());
          for(int i = 0 ; i < 16; i++)
               addItem(p[0],createTextArea(""+i),0,i,GridBagConstraints.WEST);
          p[1].add(new JButton("Click"));
          pane.setBorder(BorderFactory.createLineBorder(Color.BLACK));
          f.add(pane,BorderLayout.NORTH);
          f.add(p[1],BorderLayout.SOUTH);
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f.setSize(500,300);
          f.setLocationRelativeTo(null);
          f.setVisible(true);
     private JTextArea createTextArea(String text)
          JTextArea t = new JTextArea(text,1,10);
          t.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
          t.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null);
          return t;
     private static void addItem(JPanel p, JComponent c, int column, int row, int align)
          GridBagConstraints gc = new GridBagConstraints();
          gc.fill = GridBagConstraints.NONE;
          c.setFont(new Font("Courier New",Font.PLAIN,12));
          gc.gridx = column;
          gc.gridy = row;
          gc.gridwidth = 1;
          gc.gridheight = 1;
          gc.anchor = align;
          gc.weightx = 100;
          gc.weighty = 100;
          p.add(c, gc);
          p.validate();
     public static void main(String[] args)
          new SSCCE();
}What do I do to get the scroll bar to appear?

preferredSize worked. Thanks guys. :)
Edit: BorderLayout.CENTER also worked. Thanks.
Edited by: ElectrifiedBrain on Aug 14, 2010 12:57 AM

Similar Messages

  • HT1688 My iphone 5 won't charge and it's in perfect condition, I dont drop it and it's not cracked. I tried multiple chargers, none of them are damaged and my outlets work with other things so the problem is my phone. What's wrong with it and what should

    My iphone 5 won't charge and it's in perfect condition, I dont drop it and it's not cracked. I tried multiple chargers, none of them are damaged and my outlets work with other things so the problem is my phone. What's wrong with it and what should I do? Please help me I need my phone for work.

    Make sure there's nothing blocking a contact in the charging port of the phone.

  • HT3310 I have an iphone 5. Speaker works but I cannot hear through the apple earbuds. Tried multiple earbuds and none work. But they work in other iphone 5.

    I have an iphone 5. Speaker works but I cannot hear through the apple earbuds. Tried multiple earbuds and none work. But they work in our other iphone 5.  Has anyone been able to resolve this without pursuing a replacement ?  If so what was the fix?

    You're not using a supported carrier. What did you think Apple was going to tell you?
    As fizzDripper suggests, contact the SIM card provider. How to make an unsupported SIM work on your phone is not Apple's problem.

  • Multiple Components in a JScrollPane

    Hi all,
    I'm trying to create a JScrollPane with multiple components in it, inside a TabPane. However I keep running into problems getting the display working.
    The contents of the ScrollPane will be determined at runtime and will consist of "n" tables and JLabels, in no particular order. The only constraint is that I want to have the components displayed in rows (one column per row). The number of rows and columns in each of the JTables (and therefore their size) will also be determined at runtime.
    I've run into problems where the JScrollPane only shows the last JTable added. I've tried adding a JPanel to the JScrollPane and then adding the tables to that, but the display doesn't work - maybe something I've missed on the sizing?
    Any clues on where I should focus will be most appreciated.
    Thanks

    Hi,
    Thanks for the suggestion - I've tried using the following test code, but I cannot get it to display anything:
    public class AFrame extends JFrame {
      private JScrollPane jScrollPane1 = new JScrollPane();
      public AFrame() {
        try {
          this.getContentPane().setLayout(new BorderLayout());
          this.setTitle("Test Frame");
          this.setSize(500, 500);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          this.getContentPane().add(jScrollPane1, null);
          jScrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
          jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
          //create a table   
          JTable table1 = new JTable();
          table1.setModel(new TestTableModel());
          TableColumnModel colmod = table1.getColumnModel();
          for (int i=0; i < table1.getColumnCount(); i++) {
            TableColumn col = colmod.getColumn(i);
            col.setPreferredWidth(50);
          //create an edit field
          JEditorPane jep1 = new JEditorPane();
          jep1.setPreferredSize(new Dimension(100, 20));
          //create the panel & add two components
          JPanel p = new JPanel();
          p.setPreferredSize(this.getSize());
          double size[][] =
            {{10, TableLayout.PREFERRED, 10},  // Columns
             {10, TableLayout.PREFERRED, 10}}; // Rows
          TableLayout tl = new TableLayout(size);
          p.setLayout(tl);
          p.add(table1, "1, 1");
          p.add(jep1, "1, 2");
          validate();
          setVisible(true);
        catch(Exception e) {
          e.printStackTrace();
      public static void main(String[] args) { new AFrame(); }
    //The TestTableModel dummy class for testing
    public class TestTableModel extends AbstractTableModel  {
      public TestTableModel() {
      public int getRowCount() {
        return 2;
      public int getColumnCount() {
        return 10;
      public Object getValueAt(int row, int col) {
        return "Test value";
    }

  • How do I add multiple JPanels to a JFrame?

    I've been trying to do my own little side project to just make something for me and my friends. However, I can't get multiple JPanels to display in one JFrame. If I add more than one JPanel, nothing shows up in the frame. I've tried with SpringLayout, FlowLayout, GridBagLayout, and whatever the default layout for JFrames is. Here is the code that's important:
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import javax.swing.*;
    public class CharSheetMain {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              CharSheetFrame frame=new CharSheetFrame();
              abilityPanel aPanel=new abilityPanel();
              descripPanel dPanel=new descripPanel();
              frame.setLayout(new FlowLayout());
              abilityScore st=new abilityScore();
              abilityScore de=new abilityScore();
              abilityScore co=new abilityScore();
              abilityScore in=new abilityScore();
              abilityScore wi=new abilityScore();
              abilityScore ch=new abilityScore();
              frame.add(aPanel);
              frame.add(dPanel);
              frame.validate();
              frame.repaint();
              frame.pack();
              frame.setVisible(true);
    }aPanel and dPanel both extend JPanel. frame extends JFrame. I can get either aPanel or dPanel to show up, but not both at the same time. Can someone tell me what I'm doing wrong?

    In the future, Swing related questions should be posted in the Swing forum.
    You need to read up on [How to Use Layout Managers|http://download.oracle.com/javase/tutorial/uiswing/layout/index.html]. The tutorial has working example of how to use each layout manager.
    By default the content pane of the frame uses a BorderLayout.
    For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org], that demonstrates the incorrect behaviour.
    The code you posted in NOT a SSCCE, since we don't have access to any of your custom classes. To do simple tests of adding a panel to frame then just create a panel, give it a preferred size and give each panel a different background color so you can see how it works with your choosen layout manager.

  • Simple FocusTraversalPolicy (multiple JPanels)

    I've seen quite a few posts on this topic, so I thought I'd share my own simple solution. It solves the problem of the tab order when you have multiple JPanels and want to enforce a specific tab order.
    class MyFocusTraversalPolicy extends FocusTraversalPolicy {
        Vector components;
        public MyFocusTraversalPolicy(Vector components) {
            this.components = components;
        public Component getComponentAfter(Container root, Component comp) {
            int ix = components.indexOf(comp) + 1;
            Component c;
            if(ix >= components.size())
                c = getFirstComponent(root);
            else
                c = (Component)components.get(ix);
            return c.isEnabled() ? c : getComponentAfter(root, c);
        public Component getComponentBefore(Container root, Component comp) {
            int ix = components.indexOf(comp) - 1;
            Component c;
            if(ix < 0)
                c = getLastComponent(root);
            else
                c = (Component)components.get(ix);
            return c.isEnabled() ? c : getComponentBefore(root, c);
        public Component getDefaultComponent(Container root) {
            return (Component)components.get(0);
        public Component getFirstComponent(Container root) {
            return (Component)components.get(0);
        public Component getLastComponent(Container root) {
            return (Component)components.get(components.size() - 1);
    }Create the Swing components as usual, add the components to a vector, in the order you want them to be tabbed:
    Vector comps = new Vector();
    comps.add(textField1);
    comps.add(comoboBox1);
    comps.add(((JSpinner.DefaultEditor)spinner1.getEditor()).getTextField()); 
    MyFocusTraversalPolicy policy = new MyFocusTraversalPolicy(comps);
    setFocusTraversalPolicy(policy);Note how the JSpinner component is added. This works fine with tabbing forwards and backwards; skips disabled components as expected.

    Hi AikoMuto,
    I want to traverse focus among some components(not all the components)
    lie in multiple panels which are in different classes. Following is my
    class structure.
    Class Test extends JPanel{
    PanelA panelA;
    PanelB panelB;
    PanelC panelC;
    public void jbInit()
    Vector comps = new Vector();
    comps.add(panelA.fieldA);
    comps.add(panelB.fieldB);
    for(int i=0;i<panelC.buttons.length;i++){
    comps.add(panelC.buttons);
    MyFocusTraversalPolicy policy = new MyFocusTraversalPolicy(comps);
    setFocusTraversalPolicy(policy);
    Class PanelA extends JPanel{
    JTextField fieldA;
    JScrollbar scrollA;
    Class PanelB extends JPanel{
    JTextField fieldB;
    JScrollbar scrollB;
    Class PanelC extends JPanel{
    JButton[] buttons;
    I want to traverse focus among fieldA -> fieldB -> buttons[0]
    -> buttons[1] -> ................ -> buttons[buttons.length -1].
    I used your code and checked whether it's working for my example. Setting traversal policy is done in parent panel i.e. in Test class. But
    unfortunately it doesn't capture both Tab and Tab+Shift keys. I
    debugged the code and found that it doesn't call either of
    getComponentAfter() or getComponentBefore() methods for above key
    events.
    I guess your code is not working as the panels are in different classes.
    Could you please help me to get this done?
    Thanks & Regards

  • Drawing  Vector Data on Multiple JPanels

    Hi,
    Iam having some data in a vector which i wanted to draw on multiple panels.for example if there are 100 elements in vector i wanted to draw first 10 elements in panel 1,next 10 emenets in panel 2 etc.
    I created 10 panels and iam able to display first 10 elements on the first panel.But iam not able to draw the next 10 elements on the 2nd Panel.
    How can i do this.Anybody has any idea?Pls help me
    Thanks in Advance.
    Regards,
    virgo..

    Post your non working code, so we can see where it goes wrong.

  • How can i  add more than 500 jPanels in a jScrollPane

    Hello to all ,
    I am facing a problem related to adding jPanels in jScrollPane. My application needs more than 500 jpanels in the jscrollpane.where in each jPanel 4 jtextboxes, 1 comboboxes, 1 check box is there.when the check box will be clicked then the total row( ie row means the panel containing the 4 jtextboxes, 1 comboboxes, 1 check box ).and when the user will click on move up or move down button then the selected jpanel will move up or down.
    The tool(sun java studio enterprise 8.1) is not allowing more Jpanels to add manually. so i have to add the jpanels by writing the code in to a loop. and the problem is that when i am trying to add the code in the code generated by the tool the code written out side the code by me is not integratable into the tool generated code.
    If u watch the code here am sending u ll get what am facing the problem. The idea of creating jpanels through loop is ok but when trying to impleent in tool facing difficulties.
    A example code am sending here. please tell me how i can add more panels to the scrollpane(it is the tool generated code)
    Thanks in advance , plz help me for the above
    package looptest;
    public class loopframe extends javax.swing.JFrame {
    /** Creates new form loopframe */
    public loopframe() {
    initComponents();
    private void initComponents() {
    jScrollPane1 = new javax.swing.JScrollPane();
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jTextField1 = new javax.swing.JTextField();
    jComboBox1 = new javax.swing.JComboBox();
    jPanel3 = new javax.swing.JPanel();
    jTextField2 = new javax.swing.JTextField();
    jComboBox2 = new javax.swing.JComboBox();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jTextField1.setText("jTextField1");
    jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel2Layout.createSequentialGroup()
    .add(28, 28, 28)
    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 109, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(54, 54, 54)
    .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 156, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(35, Short.MAX_VALUE))
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(21, Short.MAX_VALUE))
    jTextField2.setText("jTextField2");
    jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel3Layout.createSequentialGroup()
    .add(20, 20, 20)
    .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(33, 33, 33)
    .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(40, Short.MAX_VALUE))
    jPanel3Layout.setVerticalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel3Layout.createSequentialGroup()
    .add(21, 21, 21)
    .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(21, Short.MAX_VALUE))
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(58, Short.MAX_VALUE))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel1Layout.createSequentialGroup()
    .add(21, 21, 21)
    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(49, 49, 49)
    .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(66, Short.MAX_VALUE))
    jScrollPane1.setViewportView(jPanel1);
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(31, 31, 31)
    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 439, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(74, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(30, 30, 30)
    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 254, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(55, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new loopframe().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    // End of variables declaration
    and
    package looptest;
    public class Main {
    public Main() {
    public static void main(String[] args) {
    new loopframe().setVisible(true);
    }

    Thanks for here kind attention to solve my problem.
    I am thinking to create the classes separately for the components (i.e the jpanel, combobox,textbox etc)and call their instaces from the for loop .But the problem is the jpanel will contain the other components and that jpanels (unlimited jpanels will be added later)will be later added to the jscrollpane.
    By writing code, the problem is to place components( the comboboxes,textboxes etc placed on the jpanel ) in appropriate coordinates . So i am doing it through tool .
    I am sending here the sample code related to my actual need . In this i have taken a jScrollPane, on that i have added jPanel1 and on jPanel1 i have added jPanel2.On jPanel2 jTextField1, jComboBox1,jCheckBox are added. If the u ll see the code u can understand what problem i am facing.
    If i am still not clearly explained ,please ask me. plz help me if u can as u have already handled a problem similar to this.
    package addpanels;
    public class Main {
    /** Creates a new instance of Main */
        public Main() {
        public static void main(String[] args) {
            new addpanels().setVisible(true);
    } and
    package addpanels;
    public class addpanels extends javax.swing.JFrame {
        /** Creates new form addpanels */
        public addpanels() {
            initComponents();
        private void initComponents() {
            jScrollPane1 = new javax.swing.JScrollPane();
            jPanel1 = new javax.swing.JPanel();
            jPanel2 = new javax.swing.JPanel();
            jTextField1 = new javax.swing.JTextField();
            jComboBox1 = new javax.swing.JComboBox();
            jCheckBox1 = new javax.swing.JCheckBox();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jTextField1.setText("jTextField1");
            jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
            jCheckBox1.setText("jCheckBox1");
            jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
            org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 131, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 144, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jCheckBox1)
                    .addContainerGap(39, Short.MAX_VALUE))
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap(17, Short.MAX_VALUE)
                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jCheckBox1))
                    .addContainerGap())
            org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(34, Short.MAX_VALUE))
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel1Layout.createSequentialGroup()
                    .add(26, 26, 26)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(152, Short.MAX_VALUE))
            jScrollPane1.setViewportView(jPanel1);
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(36, Short.MAX_VALUE)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 449, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(18, 18, 18))
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .add(32, 32, 32)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 230, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(38, Short.MAX_VALUE))
            pack();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new addpanels().setVisible(true);
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private javax.swing.JCheckBox jCheckBox1;
        private javax.swing.JComboBox jComboBox1;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextField jTextField1;
        // End of variables declaration//GEN-END:variables
    }

  • HT1476 My iPhone 4S will charge on a laptop but not from a wall plug. I have tried different boxes and different USB cords from the wall but none work. These boxes and USB cords work for other family members with iPhones. I'm stumped :/

    My iPhone 4S will charge on a laptop but not from a wall plug. I have tried different boxes and different USB cords from the wall but none work. These boxes and USB cords work for other family members with iPhones and a USB cord that works from the laptop won't work from 3 or 4 different wall boxes that work for others. I'm stumped :/

    Update: It seems as though the phone will charge if I plug it in and then turn it off.  It will not charge while the phone is on.  Also iTunes will not recognize it, so I can't sync or anything.  I read somewhere that it could be a fuse somewhere?? Or maybe the dock connector. Where is the best place to get this repaired?

  • Hiding non-working time in Team Planner View

    Hello there.  The tasks in my project are typically between 2-5 hours over a week period.  In Team Planner View, I'm hoping to provide a better representation of free time between tasks by making my bottom tier hours in a 4 hour count.  However,
    decreasing the scale forces the Task names become cut off when the event itself shrinks.
    I was hoping to remove the non-working time (i.e., nights and weekends) from the Team Planner view to enable a better view.  I'm aware that the capabilities of Team Planner View seem to be limited, but is this type of formatting at all possible?
    Thanks for the help,
    Joe

    Joe --
    After I created my response and posted it, I wondered whether you wanted to completely remove the nonworking time periods.  This is not possible.  The best you can do is to remove the shading for nonworking time periods, but you cannot remove them
    entirely in any view.  Hope this helps.
    Dale A. Howard [MVP]

  • How to enter a Absence on a Non- working day?

    Hi All,
    In our company we dont have exact work schedule rules. So we have the need to be able to enter a Absence on a Non- working day for Salaried employees. when i try to enter an absencen on-working day, the number of hours are zeroed out.
    What configuration settings I need to do So that the system will take a Absence on a non working day.
    Thanks in Advance!!!

    Hello,
    I am having the same problem currently.
    When an absence that is less than one day is entered on a non-working day with a given start time and end time (we are using CATS for entering the times) along with some attendance records, there are collisions as the system tries to create the infotype 2001 record as a full day record, and the start time and end time is not taken into account, so we are not able to transfer these hours correctly to SAP HR.
    I checked all the settings regarding the day types, but could not find the trick..
    The days we are trying to create the absences and attendances for are not public holidays, just ordinary weekends with no working hours, so I don't think Holiday Class is relevant here at all.. 
    If anyone has a solution, please update the thread..
    Best regards,
    Nihan

  • Whenever I go to iTunes with my iPod 5th generation 32 gb iPod Touch, running iOS 8.0.2, It tells me that the "Other" category is using up 14.59 gb of data. I have no clue why it says this and I have searched the internet for fixes and none worked.

    Whenever I go to iTunes with my iPod 5th generation 32 gb iPod Touch, running iOS 8.0.2, It tells me that the "Other" category is using up 14.59 gb of data. I have no clue why it says this and I have searched the internet for fixes and none worked. I have tried on a windows and a mac and noticed no change. I have tried restoring to a backup but that didn't help. I haven't had time to do a full restore but I will try if the problem persists.

    An "other" larger than about 1 1/2 GB indicates corrupted files.
    What is the Other on my iPhone and How to Remove It
    What is "Other" and What Can I Do About It?
    Next, usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
    To restore from backup see:
    iOS: How to back up
    To restore to factory settings/new iPod see:
    iTunes: Restoring iOS software

  • When I try to set up Icloud control panel in Windows Vista, I get "your setup couldn't be started because the Icloud server stopped responding. I've tried loads of fixes suggested on the net but none worked. Can anyone help me please?

    When I try to set up Icloud control panel in Windows Vista, I get "your setup couldn't be started because the Icloud server stopped responding. I've tried loads of fixes suggested on the net but none worked. Can anyone help me please?

    Hello, ksb2. 
    Thank you for visiting Apple Support Communities.
    We are investigating this issue. This article will be updated as more information becomes available.
    iCloud: iCloud Control Panel setup cannot be started
    http://support.apple.com/kb/TS5178
    Cheers,
    Jason H.

  • Can you get multiple phone socket working with BT ...

    Hi,
    So I recently had a BT engineer visit, he connected the phone line on the main socket then left. A week later they turned my BT infinity on.
    It works great but the main socket is in a different room to my office. I have a phone socket in my office right next ot my pc. But when i plug my router into this socket it fails to produce an internet connection. 
    Is there a way to get multiple phone sockets working? I would like to move my hub so it is in my office but the socket isnt giving off internet.
    Any help is much appreciated.
    Thanks.

    You need to identify the cables connected to the removable faceplate beside the red arrow - these are the extension cables to other sockets in the house. 
    Connected from here you will get voice only - not data. 
    If there is more than 1 cable you need to identify the one to your office, remove it and fit the cables to the yellow arrow connections. 
    You only need to connect the cables connected to 2 & 5 (there may be more connected to the faceplate)
    guide on this link  although it does not tell you the 2/5 connection order - I don't think polarity matters - but someone with more knowledge can advise. 
    A potential problem you may have is if there are other extension sockets connected to your office socket you use (and not the faceplate) as these then are not suitable  for phone - only data. 
    With DECT phones and the need for just one basestaion not really a probem nowadays but you need to know where each socket in your house is connected from, and what you want to use it for. 
    If you have any BB problems, BT will also insits you plug the router/modem back into the master socket for all testing. 
    EDited to add - a krone insertion tool is best for inserting the cables to the socket and has a nice pick to disconnect also. They are easy to use - search you tube for a video. 

  • Bridge won't open. Tried many ways but none works. Any suggestions please

    Bridge won't open. Tried many ways but none works. Any suggestions please

    Hi,
    Please restart your machine or kill any Bridge entry from task manager/activity manager.
    Regards
    Pragya

Maybe you are looking for