Swing problems...

Hello all... am having problems while compiling a GUI application.
The compiler says that the package org.jdesktop.layout does not exist :-/
i've read that this is happens when you align or move buttons, labels, etc..
if anyone has a solution pls let me know, and thaks!
Here is the code:
* Binomial.java
* Created on March 21, 2006, 8:38 PM
package programas;
* @author  Dionis
public class Binomial extends javax.swing.JApplet {
    /** Initializes the applet Binomial */
    public void init() {
        try {
            java.awt.EventQueue.invokeAndWait(new Runnable() {
                public void run() {
                    initComponents();
        } catch (Exception ex) {
            ex.printStackTrace();
    /** This method is called from within the init() method to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        ValorN = new javax.swing.JTextField();
        ValorP = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        JTextField3 = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel1.setText("Digite a N:");
        jLabel2.setText("Digite a P:");
        jLabel3.setText("Coeficiente B:");
        JTextField3.setEditable(false);
        jButton1.setText("Calcular");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
        jButton2.setText("Limpiar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
        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()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel1)
                    .add(jLabel2)
                    .add(jLabel3))
                .add(24, 24, 24)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(JTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(layout.createSequentialGroup()
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(ValorP, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
                                .add(ValorN, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
                            .addContainerGap(113, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(layout.createSequentialGroup()
                            .add(jButton1)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jButton2)
                            .addContainerGap()))))
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(26, 26, 26)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel1)
                    .add(ValorN, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(ValorP, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(22, 22, 22)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel3)
                    .add(JTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 78, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(65, 65, 65)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton2)
                    .add(jButton1))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    }// </editor-fold>                       
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
                ValorN.setText("");
                ValorP.setText("");
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
       int N = Integer.parseInt(ValorN.getText());
       int P = Integer.parseInt(ValorP.getText());
       int DNP = 0;
       long FN = 0;
       long FP = 0;
       long FD = 0;
       long CB =  0;
       String texto = "";
       final int repetidor = 1;
      DNP = (N - P);
        // Calcula Factorial de N
        if (N < 2){
          JTextField3.setText("Menores que 2 no tienen factorial");
        else{
        for (int factorial = 1; factorial <= N; N++){
           FN = FN * factorial;
       //Calcular Factorial de P
      if (P < 2){
       JTextField3.setText("Menores que 2 no tienen factorial");
      else{
          for(int factorial =1; factorial <= P; P++){
              FP = FP * factorial;
      //Calcular Factorial de  (N-P)
      if (DNP < 2){
          JTextField3.setText("Menores que 2 no tienen factorial");
      else {
          for (int factorial =1; factorial <= DNP; DNP++){
              FD = FD * factorial;
      //Calculo de Coeficiente Binomial
      CB = N/FP * FD;
       texto = texto+Long.toString(CB);
       JTextField3.setText("texto");
    // Variables declaration - do not modify                    
    private javax.swing.JTextField JTextField3;
    private javax.swing.JTextField ValorN;
    private javax.swing.JTextField ValorP;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    // End of variables declaration                  
}

The way for solve this problem is, step by step:
1. In your preject, over "libraries", right clik and add libraries
2. Selcet "Swing Layout Extensions" and push "Manage Libraries..."
3. "Add Jar/Folder..."
4. Select "c:/Program files/netbeams-5.0/modules/ext/swing-layout-1.0.jar" (in spanish c:/archivos de programa/....)
5. Build your project (If you have more than 1 project, be careful that you are compiling this project and no other)
Be happy my friend...

Similar Messages

  • Help! swing problem

    i keep getting the error: boxlayout can't be shared...
    what's the problem?
    Part of My code:
    JPanel CatSubPanel = new JPanel() {
                public Dimension getMinimumSize() {
                    return getPreferredSize();
                public Dimension getPreferredSize() {
                    return new Dimension(400, super.getPreferredSize().height);
                public Dimension getMaximumSize() {
                    return getPreferredSize();
    CatSubPanel.setLayout(new BoxLayout(CatSubPanel, BoxLayout.X_AXIS));
    if (MULTICOLORED) {
                CatSubPanel.setOpaque(true);
                CatSubPanel.setBackground(new Color(0, 0, 255));
            CatSubPanel.setBorder(BorderFactory.createEmptyBorder(0,1,10,5));
          CatSubPanel.add(anotherNewPanel);

    help! swing problemI don't think so.
    I just mentioned there is a Swing forum for posting Swing related questions.
    I also gave you a link to a tutorial on How to Use Box Layout.

  • [b]the swing problem!,help me[/b]

    the code:
    JScrollPane p = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,                    JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    ImageIcon icon = new ImageIcon(getClass().getResource("images/275.tif"));
    JLabel l = new JLabel(icon);
    p.setViewportView(l);
    this.getContentPane().add(p);
    this.pack();
    this.setSize(300,300);
    this.setVisible(true);
    question: I con't see the picture ,why? is the .tif format problem

    the swing problem!,help meIf you know its a Swing problem then you should be posting in the "Swing forum".
    You said it works for .jpg images, so the JDK may not support .tif images.

  • Anyone interested in adf swing problems

    adf 11g R1 swing problem
    I test the new JDEV 11g 11.1.1.1.0 releas Juli 01
    I'm using the JClient (Swing) with ADF (BC4J)
    and test a simple app
    JTable with Combobox don't work:
    im set the binding with edit binding in context for JTable
    the combobox has a static viewobject with ID and Text (ID 0,1 Text Yes No)
    The Table with combobox render OK
    but when Click the combobox i see no values in the Combobox
    in Previous Release 11.1.1.0.2 work the sample.
    It this a Bug in Classe from the bindig Definition file pageDef ????
    RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adfdtinternal.model.ide.objects.jui.JUDTLOVEditorProp"
    Hello,
    this Bug is not fixed in 11.1.1.2.0
    why ????
    thank you in advance
    Michael
    Edited by: user4796211 on 21.07.2009 12:18
    Edited by: user4796211 on 22.07.2009 00:59
    Edited by: user4796211 on 24.07.2009 09:54
    Edited by: user4796211 on 27.07.2009 09:59
    Edited by: user4796211 on 16.11.2009 10:56

    Hi,
    I installed JDeveloper 11.1.1.3.0 and cracked the nut. The LOV driven ComboBoxes in JTables will remain empty after migrating to the new version, but it seems to be merely a bug in the migration. What you need to do in order to get the ComboBoxes working is the following:
    I found out that in your PageDefs you need to add two attributes to the <combobox> definitions:
    ControlClass="javax.swing.JComboBox" Editable="false"
    This makes the ComboBoxes look like in previous releases. If you skip the "Editable" attribute, the user can type in values, which does not really work in LOVs but in static lists.
    Unfortunately I experienced another bug in the 11.1.1.3.0 release concerning LOVs: When defining the LOV in the ViewDef, JDeveloper wouldn't let you specify any additional columns to be displayed in the LOV ("Display Attributes"). -> The workaround is much easier than I first thought: Just resize the dialog a little bigger and the selection fields that I first missed appear!
    In the moment it looks to me like I could continue development with JDeveloper 11.1.1.3.0.
    Mathias
    Edited by: user7585671 on 05.05.2010 06:26

  • 1.4.2 Java Swing problems

    I have a swing application with 2 JComboBox 's, 1 JPanel (for pictures), 1 JButton and a scroll pane. Basicall the JComboBoxes have an action listener that changes the pictures when I cahnge the names. However, I would like the Jbutton when pressed to display the name chosen (from the JComboBox) and display it in the textArea. See code below.
    import javax.swing.*;
    import javax.swing.Action;
    import java.awt.event.ActionEvent;
    import  java.awt.event.ItemListener;
    import java.awt.*;
    import java.awt.event.*;
    * @author Administrator
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class choice_in2 extends JPanel implements ActionListener{
         private JLabel contender1FieldLabel;
         private JLabel contender2FieldLabel;
         private JButton runButton;
         JLabel picture1;
         JLabel picture2;
         //Text area which shows the result
         private JTextArea textArea;
         private JLabel textAreaLabel;
         public choice_in2(){
              //          Create a ChoiceField for the input of first contender
              contender1FieldLabel = new JLabel("Contender1 ",4);
              String[] contender1Strings = { "Bill", "Bob", "Don", "Michael", "John" };
              JComboBox contender1List = new JComboBox(contender1Strings);
              contender1List.setSelectedIndex(1);
              contender1List.addActionListener(new Eavesdropper1(picture1));
              //          Create a ChoiceField for the input of second contender
              contender2FieldLabel = new JLabel("Contender2 ",4);
              String[] contender2Strings = { "Philip", "Timothy", "Tom", "Kenneth", "Stone" };
              JComboBox contender2List = new JComboBox(contender2Strings);
              contender2List.setSelectedIndex(2);
              contender2List.addActionListener(new Eavesdropper2(picture2));
            //Set up the first picture.
            picture1 = new JLabel();
            picture1.setFont(picture1.getFont().deriveFont(Font.ITALIC));
            picture1.setHorizontalAlignment(JLabel.CENTER);
            updateLabel1(contender1Strings[contender1List.getSelectedIndex()]);
            picture1.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
            //Set up the second picture.
            picture2 = new JLabel();
            picture2.setFont(picture1.getFont().deriveFont(Font.ITALIC));
            picture2.setHorizontalAlignment(JLabel.CENTER);
            updateLabel2(contender2Strings[contender2List.getSelectedIndex()]);
            picture2.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
            //The preferred size is hard-coded to be the width of the
            //widest image and the height of the tallest image + the border.
            //A real program would compute this.
            picture1.setPreferredSize(new Dimension(200, 220+10));
            picture2.setPreferredSize(new Dimension(200, 220+10));
              // Create a JButton that will compute
              runButton = new JButton("Compute");
              runButton.addActionListener(new Eavesdropper3(textArea));
              // Create a JTextArea that will display the results
              textAreaLabel = new JLabel("Results");       
              textArea = new JTextArea(10,70);
              textArea.setFont(new Font("Courier",Font.PLAIN,12));
              JScrollPane scrollPane =  new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              textArea.setEditable(false);
            //Lay out the demo.
            add(contender1List, BorderLayout.WEST);
            add(picture1, BorderLayout.WEST);
            add(contender2List, BorderLayout.EAST);       
            add(picture2, BorderLayout.EAST);
            add(runButton, BorderLayout.EAST);
            add(textAreaLabel, BorderLayout.SOUTH);
            add(scrollPane, BorderLayout.SOUTH);
            setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
        /** Listens to the combo box. */
        public void actionPerformed(ActionEvent e) {
        public void updateLabel1(String name1) {
            ImageIcon icon1 = createImageIcon( name1 + ".jpg");
            picture1.setIcon(icon1);
            picture1.setToolTipText("A drawing of a " + name1.toLowerCase());
            if (icon1 != null) {
                picture1.setText(null);
            } else {
                picture1.setText("Image not found");
        public void updateLabel2(String name2) {
             ImageIcon icon2 = createImageIcon( name2 + ".jpg");
            picture2.setIcon(icon2);
            picture2.setToolTipText("A drawing of a " + name2.toLowerCase());
            if (icon2 != null) {
               picture2.setText(null);
            } else {
                picture2.setText("Image not found");
        /** Returns an ImageIcon, or null if the path was invalid. */
        public ImageIcon createImageIcon(String path) {
            java.net.URL imgURL = choice_in2.class.getResource(path);
            if (imgURL != null) {
                return new ImageIcon(imgURL);
            } else {
                System.err.println("Couldn't find file: " + path);
                return null;
        class Eavesdropper2 implements ActionListener {
            JLabel myTextArea;
            public Eavesdropper2(JLabel ta) {
                 myTextArea = ta;
            public void actionPerformed(ActionEvent e) {
                JComboBox contender2List = (JComboBox)e.getSource();
                String contender2ListName = (String)contender2List.getSelectedItem();
                updateLabel2(contender2ListName);
                Eavesdropper3 code;
                code = new Eavesdropper3(contender2ListName);
        class Eavesdropper1 implements ActionListener {
            JLabel myTextArea;
            public Eavesdropper1(JLabel tt) {
                 myTextArea = tt;
            public void actionPerformed(ActionEvent e) {
                JComboBox contender1List = (JComboBox)e.getSource();
                String contender1ListName = (String)contender1List.getSelectedItem();
                updateLabel1(contender1ListName);
        class Eavesdropper3  implements ActionListener  {
             String contender22;
            JTextArea myTextArea;
            public Eavesdropper3(JTextArea bb) {
                 myTextArea = bb;
            public Eavesdropper3(String contender2ListName){
                 contender22 = contender2ListName;
               * @return Returns the contender22.
              public String getContender22() {
                   return contender22;
            public void actionPerformed(ActionEvent e) {
                 textArea.setText("Wild Test");
                 textArea.append("\n      OUTCOME    \n\n " +getContender22());
    }

    weebib
    We are using Windows XP , Nvidia graphics card, with Multiview. I hope the problem is not specific to the platform.
    It is reproducible with 1.4.2 and absent in 1.4.1
    camickr
    I am new to this forum. didn't know about code blocks.

  • Urgent help need on swing problem

    Dear friends,
    I met a problem and need urgent help from guru here, I am Swing newbie,
    I have following code and hope to draw lines between any two components at RUN-TIME, not at design time
    Please throw some skeleton code, Thanks so much!!
    code:
    package com.swing.test;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class LongguConnectLineCommponent
        public static void main(String[] args)
            JFrame f = new JFrame("Connecting Lines");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new ConnectionPanel());
            f.setSize(400,300);
            f.setLocation(200,200);
            f.setVisible(true);
    class ConnectionPanel extends JPanel
        JLabel label1, label2, label3, label4;
        JLabel[] labels;
        JLabel selectedLabel;
        int cx, cy;
        public ConnectionPanel()
            setLayout(null);
            addLabels();
            label1.setBounds( 25,  50, 125, 25);
            label2.setBounds(225,  50, 125, 25);
            label3.setBounds( 25, 175, 125, 25);
            label4.setBounds(225, 175, 125, 25);
            determineCenterOfComponents();
            ComponentMover mover = new ComponentMover();
            addMouseListener(mover);
            addMouseMotionListener(mover);
        public void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            Point[] p;
            for(int i = 0; i < labels.length; i++)
                for(int j = i + 1; j < labels.length; j++)
                    p = getEndPoints(labels, labels[j]);
    //g2.draw(new Line2D.Double(p[0], p[1]));
    private Point[] getEndPoints(Component c1, Component c2)
    Point
    p1 = new Point(),
    p2 = new Point();
    Rectangle
    r1 = c1.getBounds(),
    r2 = c2.getBounds();
    int direction = r1.outcode(r2.x, r2.y);
    switch(direction) // r2 located < direction > of r1
    case (Rectangle.OUT_LEFT): // West
    p1.x = r1.x;
    p1.y = r1.y;
    p2.x = r2.x + r2.width;
    p2.y = r2.y;
    if(r1.y > cy)
    p1.y = r1.y + r1.height;
    p2.y = r2.y + r2.height;
    break;
    case (Rectangle.OUT_TOP): // North
    p1.x = r1.x;
    p1.y = r1.y;
    p2.x = r2.x;
    p2.y = r2.y + r2.height;
    if(r1.x > cx && r2.x > cx)
    p1.x = r1.x + r1.width;
    p2.x = r2.x + r2.width;
    break;
    case (Rectangle.OUT_LEFT + Rectangle.OUT_TOP): // NW
    p1.x = r1.x;
    p1.y = r1.y;
    p2.x = r2.x + r2.width;
    p2.y = r2.y;
    if(r1.y > r2.y + r2.height)
    p2.y = r2.y + r2.height;
    break;
    case (Rectangle.OUT_RIGHT): // East
    p1.x = r1.x + r1.width;
    p1.y = r1.y;
    p2.x = r2.x;
    p2.y = r2.y;
    if(r1.y > cy)
    p1.y = r1.y + r1.height;
    p2.y = r2.y + r2.height;
    break;
    case (Rectangle.OUT_TOP + Rectangle.OUT_RIGHT): // NE
    p1.x = r1.x + r1.width;
    p1.y = r1.y;
    p2.x = r2.x;
    p2.y = r2.y;
    if(r1.y > cy)
    p1.y = r1.y + r1.height;
    p2.y = r2.y + r2.height;
    if(r1.y > r2.y + r2.height)
    p1.y = r1.y;
    else
    if(r1.y > r2.y + r2.height)
    p2.y = r2.y + r2.height;
    break;
    case (Rectangle.OUT_BOTTOM): // South
    p1.x = r1.x;
    p1.y = r1.y + r1.height;
    p2.x = r2.x;
    p2.y = r2.y;
    if(r1.x > cx && r2.x > cx)
    p1.x = r1.x + r1.width;
    p2.x = r2.x + r2.width;
    break;
    case (Rectangle.OUT_RIGHT + Rectangle.OUT_BOTTOM): // SE
    p1.x = r1.x + r1.width;
    p1.y = r1.y + r1.height;
    p2.x = r2.x;
    p2.y = r2.y;
    break;
    case (Rectangle.OUT_BOTTOM + Rectangle.OUT_LEFT): // SW
    p1.x = r1.x;
    p1.y = r1.y + r1.height;
    p2.x = r2.x;
    p2.y = r2.y;
    if(r1.x > r2.x + r2.width)
    p2.x = r2.x + r2.width;
    if(r1.x > cx && r2.x > cx)
    p1.x = r1.x + r1.width;
    p2.x = r2.x + r2.width;
    return new Point[] {p1, p2};
    private void determineCenterOfComponents()
    int
    xMin = Integer.MAX_VALUE,
    yMin = Integer.MAX_VALUE,
    xMax = 0,
    yMax = 0;
    for(int i = 0; i < labels.length; i++)
    Rectangle r = labels[i].getBounds();
    if(r.x < xMin)
    xMin = r.x;
    if(r.y < yMin)
    yMin = r.y;
    if(r.x + r.width > xMax)
    xMax = r.x + r.width;
    if(r.y + r.height > yMax)
    yMax = r.y + r.height;
    cx = xMin + (xMax - xMin)/2;
    cy = yMin + (yMax - yMin)/2;
    private class ComponentMover extends MouseInputAdapter
    Point offsetP = new Point();
    boolean dragging;
    public void mousePressed(MouseEvent e)
    Point p = e.getPoint();
    for(int i = 0; i < labels.length; i++)
    Rectangle r = labels[i].getBounds();
    if(r.contains(p))
    selectedLabel = labels[i];
    offsetP.x = p.x - r.x;
    offsetP.y = p.y - r.y;
    dragging = true;
    break;
    public void mouseReleased(MouseEvent e)
    dragging = false;
    public void mouseDragged(MouseEvent e)
    if(dragging)
    Rectangle r = selectedLabel.getBounds();
    r.x = e.getX() - offsetP.x;
    r.y = e.getY() - offsetP.y;
    selectedLabel.setBounds(r.x, r.y, r.width, r.height);
    determineCenterOfComponents();
    repaint();
    private void addLabels()
    label1 = new JLabel("Label 1");
    label2 = new JLabel("Label 2");
    label3 = new JLabel("Label 3");
    label4 = new JLabel("Label 4");
    labels = new JLabel[] {
    label1, label2, label3, label4
    for(int i = 0; i < labels.length; i++)
    labels[i].setHorizontalAlignment(SwingConstants.CENTER);
    labels[i].setBorder(BorderFactory.createEtchedBorder());
    add(labels[i]);

    If you need some help, be respectful of the forum rules and people will help. By using "urgent" in the title and bumping your message every 2 hours you're just asking to be ignored (which is what you ended up with).

  • Swing problem: table is not refreshed when i open it  from jdialog

    Hi , my situation is this one :
    1. i have a swing form.
    2. i have created a panel form where i have a drop down list and a table. wich are depndend with each other. When i choose an item to the drop down list the value in the table is changed.
    3. i invoke this panel into the form with drag and drop, with invoke jDialog from button option.
    4. First time i run the form and open the panel from button the drop down list and the table are working correctly.
    5. i close the panel and open it again: And at this time when i choose an item from drop down list the table is not refreshed anymore. I have to run the form again if i want that this panel to work correctly.
    Am i doing smth wrong? I dont have too much experience in swing , and the documentation for adf-swign are really poor .
    Ps: Maybe i should explain the way i have created the drop down list and table in the panel . i am not using smth like execute with parameters for the view in the table. I have created a link between the view in the drop down list and the view in the table. It seems they work correcly if i run the panel for the first time.
    Thanks in advance !

    To answer your question, Restore the iPhone with current iTunes on your computer. If fixed, it was software. If still problem, most likely hardware, and then make Genius reservation or set up Service and take or send to Apple for resolution under Warranty.

  • ADF Swing problem

    Hi,
    We have some ADF Swing projects converted into libraries.
    and these Library files are going to be used in another project.(it's done already)
    problem :
    this is an event that is supposed to call a form from a library :
    private void jButton1_actionPerformed(ActionEvent e) {
    LocationListForm lf = new LocationListForm();
    Lf.main(null);
    "LocationListForm " has a JPanel named "locationListPanel1"
    when the "Lf.main(null)" is called we have a problem with this line (in main method) :
    locationListPanel1.bindNestedContainer(panelBinding.findNestedPanelBinding("view_LocationListPanelPageDef1"));
    "panelBinding" is returned null and on the Bold line we get an exception.
    public void bindNestedContainer(JUPanelBinding ctr) {
    //Exception on this line
    *if (panelBinding.getPanel() == null) {*
    ctr.setPanel(this);
    panelBinding.release(DCDataControl.REL_VIEW_REFS);
    panelBinding = ctr;
    registerProjectGlobalVariables(panelBinding.getBindingContext());
    try {
    jbInit();
    } catch (Exception ex) {
    ex.printStackTrace();
    ctr.reportException(ex);
    Please Advise,
    Thank you

    Hi,
    We have some ADF Swing projects converted into libraries.
    and these Library files are going to be used in another project.(it's done already)
    problem :
    this is an event that is supposed to call a form from a library :
    private void jButton1_actionPerformed(ActionEvent e) {
    LocationListForm lf = new LocationListForm();
    Lf.main(null);
    "LocationListForm " has a JPanel named "locationListPanel1"
    when the "Lf.main(null)" is called we have a problem with this line (in main method) :
    locationListPanel1.bindNestedContainer(panelBinding.findNestedPanelBinding("view_LocationListPanelPageDef1"));
    "panelBinding" is returned null and on the Bold line we get an exception.
    public void bindNestedContainer(JUPanelBinding ctr) {
    //Exception on this line
    *if (panelBinding.getPanel() == null) {*
    ctr.setPanel(this);
    panelBinding.release(DCDataControl.REL_VIEW_REFS);
    panelBinding = ctr;
    registerProjectGlobalVariables(panelBinding.getBindingContext());
    try {
    jbInit();
    } catch (Exception ex) {
    ex.printStackTrace();
    ctr.reportException(ex);
    Please Advise,
    Thank you

  • Swing problem with mac os 9 and 10

    Hi,
    I've finished my first "big" application, a little french-lemmatisation tool. It works well on my PC but some people who have tried it with mac os 9 and X tell me it doesn't work at all ?!
    I've built my soft with InstallAnywhere 5 (is that the bad idea ?). On mac OS9, it reports java.lang.NoClassDEfFoundError : javax/swing/UIManager (which is the first Swing element that is called). So it seems that the path is not correct. On mac OSX, it stops too (no message)... I've spent my day to try to understand what I should change. Without success.
    Where do you think I should watch to correct the paths ?
    The installer (in French) can be found at this adress : http://wwwpeople.unil.ch/Benoit.Curdy/install.htm
    (I don't think there is a problem in the code but if someone wants to have a look : http://wwwpeople.unil.ch/Benoit.Curdy) it's free ;)
    Thanks

    I developed a application for MAC os/x and win plateforms.
    To distribute my appplication on wins , i use installAnywhere but for the mac I use MRJAppBuilder to create a application.
    Then the user has just to drag the directory from the CD to his desktop or anywhere else, and make an alias to the app on his desktop to lauuch the app.
    MRAppBuilder is on every MAC OS/X, I think.
    Hope it helps

  • Java Swing problems

    Hi all,
    Why do JPanel, JButton, J*, etc. not function properly on my pc. I have a relatively new Sony laptop and when ever I try using Swing components and scroll my mouse over an area after clicking a Jbutton or using other Swing objects a portion of the screen gets repainted incorrectly. It usually uncovers an underlying panel in a card layout. Any advice would be greatly appreciated, thanks.

    Hm ...
    I never had problems with that and ofcourse I do never a repaint by myself - if it is programmed correct, the GUI will do that, that is not my business.
    Perhaps you mix Swing with AWT-components - they don't mix and cause display troubles. Check, if you always use Swing-Elements - especially AWT-components added to containers with CardLayout or to a JTabbedPane produce strange behavior.
    greetings Marsian

  • Chess: Java Swing problem!! Help need

    Hi, I have just learn java swing and now creating a chess game. I have sucessfully create a board and able to display chess pieces on the board. By using JLayeredPane, I am able to use drag and drop for the piece. However, there is a problem which is that I can drop the chess piece off the board and the piece would disappear. I have try to solve this problem by trying to find the location that the chess piece is on, store it somewhere and check if the chess piece have been drop off bound. However, I could not manage to solve it. Also, I am very confuse with all these layer thing.
    Any suggestion would be very helpful. Thanks in advance

    I wonder if you are biting off a little more than you can chew. This seems like a big project for a beginning coder. Anyway, my suggestions can only be general since we only have general information:
    1) Break the big problem down into little pieces. Get the pieces working, then put them together.
    2) Make sure your program logic is separate from your GUI.
    3) If still having problems, post an SSCCE. See this link to tell you how:
    http://homepage1.nifty.com/algafield/sscce.html
    4) And as camikr would say (and flounder just said): next time, post this in the Swing forum.
    Good luck!

  • Swing Problem : Wrap Multiple line in a Cell (JTable)

    Hello...
    I'm doing a swing app. The functions included are to print the Jtable...
    in Colum 3 i've applied wrapping word in a cell.. the problem is when i print the table, the border in column 3 which wrap the word will not be visible...y?how can i solve this problem...can see my code like below
    MyCellRenderer cellRenderer = new MyCellRenderer(); 
    TableColumn column = null;
      column = tblProgram.getColumn(ResourceBundle.getBundle("Program").getString("TBL_DESC"));
    //get data in column 3  
    column.setCellRenderer(cellRenderer);
      public class MyCellRenderer extends JTextArea implements TableCellRenderer {
            public MyCellRenderer() {
              setLineWrap(true);
              setWrapStyleWord(true);
              setMargin(new Insets(0, 5, 0, 5));
          public Component getTableCellRendererComponent(JTable table, Object
                  value, boolean isSelected, boolean hasFocus, int row, int column) {
               setText((String)value);
              setSize(table.getColumnModel().getColumn(column).getWidth(),
                      getPreferredSize().height);
              if (table.getRowHeight(row) != getPreferredSize().height) {
                      table.setRowHeight(row, getPreferredSize().height);
              return this;
       } ty in advance :D

    Multi-Post:
    http://forum.java.sun.com/thread.jspa?threadID=741629&tstart=20
    Thanks for fixing the code format tags, next time just edit the post instead of reposting.

  • Swings problem.. Urgent

    Hi,
    In my java application I am using Swings and using around 30 text fields. For almost each and every field i have Key Typed, Key Presssed and Action performed events.
    The problem is whenever there is any field disabled and user double clicks that field then it's text is selected and on presssing enter button all the above mentioned evenets are called.
    Is there any way by which I can supress the calling of these events in case the field is disabled?
    Hoping to get a quick reply as I ned to do it today itself
    Thanks in advance
    Ankush

    Whether I make it non editable or disabled or both it hardly matters.
    The action performed, Key Pressed and Key Typed events will be called.
    Yes U suggested right, That is one solution but is there any way by which I can attach listeners to fields other than those which are not Editable/Disabled? Or any way by which if field is disabled/non editable then some method is called in which I will do nothing otherwise regular Action Performed, Key Pressed, Key Typed events are called?
    Thanks
    Ankush

  • JOGL with SWING problem

    Hello i speak spanish my english is not good
    When i execute a java jogl program i've problem with swing.
    The jogl window catch the events from swing and execute
    accions out control.
    How can i lock the events from swing ?
    Thanks
    [email protected]

    jogl commands: translate, rotate ...
    When a box across the jogl window this commands
    are executed. This box is created with JOptionPane.
    i didnt find a solution yet.

  • Import javax.swing problems

    hey
    I am new to java and have recently downloaded j2sdk1.4.2_04. I am trying to create a simple graphical application. However, It doesnt seem to import the javax.swing.* libraries. I understand that there is the src.zip in the directory, so I unzipped it but it still doesn't read the package. I read elsewhere on this forum that you should set the path to src.zip. I have tried that and it also doesnt work. My current path is:
    PATH=C:\j2sdk1.4.2_04\lib\src.zip;C:\j2sdk1.4.2_04\bin
    Is there an error in this, or what else should I try? All suggestions greatly appreciated.

    There's no need to set your classpath when importing any of the standard packages that are provided by the JDK. Perhaps you could post a (small) code sample and the compiler error you are getting.

Maybe you are looking for

  • Urgent :Authentication fails for Policy Agent on weblogic 8 SP3

    Hi I am using policy agent for perimeter authentication for an application deployed on weblogic.When i try and access the application using any user which exists on Identity server i get the following exception in the amRealm log. 09/20/2005 06:17:07

  • Windows XP SP3 in Spanish, you can not generate spoken menus

    hello. Windows XP SP3 in Spanish, you can not generate spoken menus to iPod. When you synchronize creates WAV audio files at the root of drive C, instead of the inside of the iPod. How to solve this problem. Thank you.

  • Monitor usage of Webdynpro for Abap Application

    Dear all, How does one monitor how many times a Webdynpro for Abap application is called by users? We have an i-view in the portal that calls a WD4A program in  the back-end system. Is there anything in the portal or back-end that will give us the us

  • Attach BP Url via Code

    Hi experts!! I am using cl_crm_documents=>create_with_url to create attachments via URL, in BPs. The problem is that the attachments are uploaded as application/octet-stream, hence i cannot open . When i manually attach URLs to BP they are displayed

  • Avoiding an apostrophe

    Hi, in 11.2.0.3 I ran the following : SQL> select 'alter database rename file '''||name||''' to ''C:\data\test\log\'''||substr(name,instr(name,'\',-1)+1)||''';' from v$tempfile alter database rename file 'C:\DATA\TEST\LOG\TEMP01.DBF' to 'C:\data\test