Set initialName of SWING jPanel on runtime through placeholder

Is it possible to create a jLabel1 on runtime like:
javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
and then set the name jLabel1 from another string or a placeholder.
i would like to set the name from a combination of jLabel and a placeholder such as "CustomerName", so that the name is jLabelCustomerName!
Exact definition:
i have a text file, which contains many customers. if a customer is found then a jLabel should be created. i want to set the name of the jLabel (!! not the text) on runtime, so that the name is jLabelCustomerAlbertEinstein.

Ok i will reflect the same example that i am achieving to to.
This is a small extraction of my XPDL file. the participants should be the customers! or in this example these are participants that work on an activity of an BPMN model.
ProcessPackage.xpdl:
<xpdl2:Participants>
        <xpdl2:Participant Id="_i3pSAKLFEd60iPJMZdNxfQ" xpdExt:DisplayName="Clerk" Name="Clerk">
          <xpdl2:ParticipantType Type="ROLE"/>
          <xpdl2:ExtendedAttributes>
            <xpdl2:ExtendedAttribute Name="ParticipantSimulationData"><simulation:ParticipantSimulationData SlaMinimumUtilisation="80.0" SlaMaximumUtilisation="95.0">
                <simulation:Instances>2</simulation:Instances>
                <simulation:TimeUnitCost>
                  <simulation:Cost>0.21666666666666667</simulation:Cost>
                  <simulation:TimeDisplayUnit>HOUR</simulation:TimeDisplayUnit>
                </simulation:TimeUnitCost>
              </simulation:ParticipantSimulationData></xpdl2:ExtendedAttribute>
          </xpdl2:ExtendedAttributes>
          <iProcessExt:ParticipantProperties UseRoleSemantics="false"/>
        </xpdl2:Participant>
        <xpdl2:Participant Id="_kUUrYKLFEd60iPJMZdNxfQ" xpdExt:DisplayName="Manager" Name="Manager">
          <xpdl2:ParticipantType Type="ROLE"/>
          <xpdl2:ExtendedAttributes>
            <xpdl2:ExtendedAttribute Name="ParticipantSimulationData"><simulation:ParticipantSimulationData SlaMinimumUtilisation="50.0" SlaMaximumUtilisation="100.0">
                <simulation:Instances>1</simulation:Instances>
                <simulation:TimeUnitCost>
                  <simulation:Cost>0.8333333333333334</simulation:Cost>
                  <simulation:TimeDisplayUnit>HOUR</simulation:TimeDisplayUnit>
                </simulation:TimeUnitCost>
              </simulation:ParticipantSimulationData></xpdl2:ExtendedAttribute>
          </xpdl2:ExtendedAttributes>
          <iProcessExt:ParticipantProperties UseRoleSemantics="false"/>
        </xpdl2:Participant>
        <xpdl2:Participant Id="_lfk9kKLFEd60iPJMZdNxfQ" xpdExt:DisplayName="Operator" Name="Operator">
          <xpdl2:ParticipantType Type="ROLE"/>
          <xpdl2:ExtendedAttributes>
            <xpdl2:ExtendedAttribute Name="ParticipantSimulationData"><simulation:ParticipantSimulationData SlaMinimumUtilisation="85.0" SlaMaximumUtilisation="90.0">
                <simulation:Instances>1</simulation:Instances>
                <simulation:TimeUnitCost>
                  <simulation:Cost>0.16666666666666666</simulation:Cost>
                  <simulation:TimeDisplayUnit>HOUR</simulation:TimeDisplayUnit>
                </simulation:TimeUnitCost>
              </simulation:ParticipantSimulationData></xpdl2:ExtendedAttribute>
          </xpdl2:ExtendedAttributes>
          <iProcessExt:ParticipantProperties UseRoleSemantics="false"/>
        </xpdl2:Participant>
      </xpdl2:Participants>the above example has 3 participants. The Operator, Manager and Clerk which operate an activity of an BPMN model.
readWriteTextFile.java:
// initialization and declaration of important variables such of Classes jPanel, jTabbedPane, jTextField, jLabel....
File aFile = new File(filePath);
// not opening a new BufferredReader which gets aFile (here its the ProcessPackage.xpdl file which is opened by the user through a jFileChooser)
BufferedReader input =  new BufferedReader(new FileReader(aFile));
        while (( line = input.readLine()) != null){
// this if case checks weather the actual line has the string "<xpdl2:Participants>"
// if it does have this string we can assume that its a Participant-section of the textFile
          if(line.indexOf("<xpdl2:Participants>")!= -1){
              while(line.indexOf("</xpdl2:Participants>")== -1){
                    line = input.readLine();
// get the name of the participant which in the above XPDL file is a Manager, Operator or Clerk
                        participantsNamePosition = line.indexOf("xpdExt:DisplayName=");
                    if(participantsNamePosition != -1){
                        participantsName = line.substring(participantsNamePosition);
                        participantsName = participantsName.substring(participantsName.indexOf("\""), participantsName.indexOf("\" Name="));
// get the number of participants and at it by one! this is to know how many participants we have
                        numberOfParticipants = numberOfParticipants +1;
// now we got the name of the participant saying if its Manager, Operator or Clerk
// i make it simple because there are several other information extracted from the XPDL-textfile
// now i want to hand over the name of the participant (manager, operator or Clerk) to the class
NewJPanel2_3.setInitialVariablesParticipants(numberOfParticipants, participantsName);
}NewJPanel2_3.java:// HERE COMES THE CODE THAT I'M SEARCHING FOR
// this function is called when the name and the number of Participants are known)
static void setInitialVariablesParticipants(int numberOfParticipants, String participantsName) {
// HERE COMES THE CODE THAT I'M SEARCHING FOR
                      |
                     \|/
if(numberOfParticipants == 1){
// it should now create a new jLabel and jTextField and set the text of
// the jTextField of the participants name
// the first participant that is found it the clerk
// manager is found because he is the second found participant
if(numberOfParticipants == 2){
// it should now create a new jLabel and jTextField and set the text of
// the jTextField of the participants name
// the first participant that is found it the clerk
// operator is found because he is the second found participant
if(numberOfParticipants == 3){
// it should now create a new jLabel and jTextField and set the text of
// the jTextField of the participants name
// the third participant that is found it the operator
}additionally i dont want to create 1000 if(numberOfParticipants == 3) steps. that is why i want to set the initial-name (not the text) of the jLabel and JtextField to a participants name, which is in the textBox.

Similar Messages

  • How to resize JPanel at Runtime ??

    Hi,
    Our Project me t a problem as below, we hope to resize JPanel at Runtime , not at design time, ie, when we first click the button called "Move JPanel" , then we click the JPanel, then we can drag it around within main panel, but we hope to resize the size of this JPanel when we point to the border of this JPanel then drag its border to zoom in or zoom out this JPanel.
    Please advice how to do that??
    Thanks in advance.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.util.Vector;
    import javax.swing.*;
    import javax.swing.border.LineBorder;
    import javax.swing.event.*;
    public class ResizeJPanels extends JPanel
        protected JLabel label1, label2, label3, label4, labeltmp;
        protected JLabel[] labels;
        protected JPanel[] panels;
        protected JPanel selectedJPanel;
        protected JButton btn  = new JButton("Move JPanel");
        int cx, cy;
        protected Vector order = new Vector();      
         public static void main(String[] args)
            JFrame f = new JFrame("Test");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new ResizeJPanels().GroupJLabels());
            f.setSize(600,700);
            f.setLocation(200,200);
            f.setVisible(true);
         private MouseListener ml = new MouseAdapter() {  
              public void mousePressed(MouseEvent e) {   
                   Point p = e.getPoint();      
                   JPanel jp = new JPanel();
                   jp.setLayout(null);
                   Component[] c = ((JPanel)e.getSource()).getComponents();
                   System.out.println("c.length = " + c.length);      
                   for(int j = 0; j < c.length; j++) {        
                        if(c[j].getBounds().contains(p)) {     
                             if(selectedJPanel != null && selectedJPanel != (JPanel)c[j])
                                  selectedJPanel.setBorder(BorderFactory.createEtchedBorder());
                             selectedJPanel = (JPanel)c[j];            
                             selectedJPanel.setBorder(BorderFactory.createLineBorder(Color.green));
                             break;             
                        add(jp);
                        revalidate();
    public JPanel GroupJLabels ()
              setLayout(null);
            addLabels();
            label1.setBounds( 125,  150, 125, 25);
            label2.setBounds(425,  150, 125, 25);
            label3.setBounds( 125, 575, 125, 25);
            label4.setBounds(425, 575, 125, 25);
            //add(btn);
            btn.setBounds(10, 5, 205, 25);
                add(btn);
           determineCenterOfComponents();
            ComponentMover mover = new ComponentMover();
             ActionListener lst = new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                     ComponentMover mover = new ComponentMover();
                           addMouseListener(mover);
                           addMouseMotionListener(mover);
              btn.addActionListener(lst);
              addMouseListener(ml); 
              return this;
        public void paintComponent(final Graphics g)
             super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
             Point[] p;
            g2.setStroke(new BasicStroke(4f));
           for(int i = 0 ; i < order.size()-1; i++) {
                JPanel l1 = (JPanel)order.elementAt(i);
                JPanel l2 = (JPanel)order.elementAt(i+1);
                p = getCenterPoints(l1, l2);
                g2.setColor(Color.black);
               // g2.draw(new Line2D.Double(p[0], p[1]));            
        private Point[] getCenterPoints(Component c1, Component c2)
            Point
                p1 = new Point(),
                p2 = new Point();
            Rectangle
                r1 = c1.getBounds(),
                r2 = c2.getBounds();
                 p1.x = r1.x + r1.width/2;
                 p1.y = r1.y + r1.height/2;
                 p2.x = r2.x + r2.width/2;
                 p2.y = r2.y + r2.height/2;
            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.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 < panels.length; i++)
    Rectangle r = panels[i].getBounds();
    if(r.contains(p))
    selectedJPanel = panels[i];
    order.addElement(panels[i]);
    offsetP.x = p.x - r.x;
    offsetP.y = p.y - r.y;
    dragging = true;
    repaint(); //added
    break;
    public void mouseReleased(MouseEvent e)
    dragging = false;
    public void mouseDragged(MouseEvent e)
    if(dragging)
    Rectangle r = selectedJPanel.getBounds();
    r.x = e.getX() - offsetP.x;
    r.y = e.getY() - offsetP.y;
    selectedJPanel.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
    JLabel jl = new JLabel("This is resizeable JPanel at Runtime");
    jl.setBackground(Color.green);
    jl.setOpaque(true);
              jl.setFont(new Font("Helvetica", Font.BOLD, 18));
    JPanel jp = new JPanel();
    jp.setLayout(new BorderLayout());
    panels = new JPanel[]{jp};
              jp.setBorder(new LineBorder(Color.black, 3, false));
    jp.setPreferredSize(new Dimension(400,200));
    jp.add(jl, BorderLayout.NORTH);
    for(int i = 0; i < labels.length; i++)
    labels[i].setHorizontalAlignment(SwingConstants.CENTER);
    labels[i].setBorder(BorderFactory.createEtchedBorder());
    jp.add(labels[i], BorderLayout.CENTER);
    jp.setBounds(100, 100, 400,200);
    add(jp);

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.MouseInputAdapter;
    public class Resizing extends JPanel {
        public Resizing() {
            super(null);
            addPanel();
            PanelControlAdapter control = new PanelControlAdapter(this);
            addMouseListener(control);
            addMouseMotionListener(control);
        private void addPanel() {
            JLabel jl = new JLabel("This is resizeable JPanel at Runtime");
            jl.setBackground(Color.green);
            jl.setOpaque(true);
            jl.setFont(new Font("Helvetica", Font.BOLD, 18));
            JPanel jp = new JPanel();
            jp.setLayout(new BorderLayout());
            jp.setBorder(new LineBorder(Color.black, 3, false));
            jp.add(jl, BorderLayout.NORTH);
            jp.setBounds(50,50,400,200);
            add(jp);
        public static void main(String[] args) {
            JFrame f = new JFrame("Test");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new Resizing());
            f.setSize(500,400);
            f.setLocation(100,100);
            f.setVisible(true);
    class PanelControlAdapter extends MouseInputAdapter {
        Resizing host;
        Component selectedComponent;
        LineBorder black;
        LineBorder green;
        Point offset = new Point();
        Point start = new Point();
        boolean dragging = false;
        boolean resizing = false;
        public PanelControlAdapter(Resizing r) {
            host = r;
            black = new LineBorder(Color.black, 3, false);
            green = new LineBorder(Color.green, 3, false);
        public void mouseMoved(MouseEvent e) {
            Point p = e.getPoint();
            boolean hovering = false;
            Component c = host.getComponent(0);
            Rectangle r = c.getBounds();
            if(r.contains(p)) {
                hovering = true;
                if(selectedComponent != c) {
                    if(selectedComponent != null)  // reset
                        ((JComponent)selectedComponent).setBorder(black);
                    selectedComponent = c;
                    ((JComponent)selectedComponent).setBorder(green);
                if(overBorder(p))
                    setCursor(p);
                else if(selectedComponent.getCursor() != Cursor.getDefaultCursor())
                    selectedComponent.setCursor(Cursor.getDefaultCursor());
            if(!hovering && selectedComponent != null) {
                ((JComponent)selectedComponent).setBorder(black);
                selectedComponent = null;
        private boolean overBorder(Point p) {
            Rectangle r = selectedComponent.getBounds();
            JComponent target = (JComponent)selectedComponent;
            Insets insets = target.getBorder().getBorderInsets(target);
            // Assume uniform border insets.
            r.grow(-insets.left, -insets.top);
            return !r.contains(p);
        private void setCursor(Point p) {
            JComponent target = (JComponent)selectedComponent;
            AbstractBorder border = (AbstractBorder)target.getBorder();
            Rectangle r = target.getBounds();
            Rectangle ir = border.getInteriorRectangle(target, r.x, r.y, r.width, r.height);
            int outcode = ir.outcode(p.x, p.y);
            Cursor cursor;
            switch(outcode) {
                case Rectangle.OUT_TOP:
                    cursor = Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_TOP + Rectangle.OUT_LEFT:
                    cursor = Cursor.getPredefinedCursor(Cursor.NW_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_LEFT:
                    cursor = Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_LEFT + Rectangle.OUT_BOTTOM:
                    cursor = Cursor.getPredefinedCursor(Cursor.SW_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_BOTTOM:
                    cursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_BOTTOM + Rectangle.OUT_RIGHT:
                    cursor = Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_RIGHT:
                    cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
                    break;
                case Rectangle.OUT_RIGHT + Rectangle.OUT_TOP:
                    cursor = Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR);
                    break;
                default:
                    cursor = Cursor.getDefaultCursor();
            selectedComponent.setCursor(cursor);
        public void mousePressed(MouseEvent e) {
            Point p = e.getPoint();
            if(selectedComponent != null) {
                Rectangle r = selectedComponent.getBounds();
                if(selectedComponent.getCursor() == Cursor.getDefaultCursor()) {
                    offset.x = p.x - r.x;
                    offset.y = p.y - r.y;
                    dragging = true;
                } else {
                    start = p;
                    resizing = true;
        public void mouseReleased(MouseEvent e) {
            dragging = false;
            resizing = false;
        public void mouseDragged(MouseEvent e) {
            Point p = e.getPoint();
            if(dragging || resizing) {
                Rectangle r = selectedComponent.getBounds();
                if(dragging) {
                    r.x = p.x - offset.x;
                    r.y = p.y - offset.y;
                    selectedComponent.setLocation(r.x, r.y);
                } else if(resizing) {
                    int type = selectedComponent.getCursor().getType();
                    switch(type) {
                        case Cursor.N_RESIZE_CURSOR:
                            r.height -= p.y - start.y;
                            r.y = p.y;
                            break;
                        case Cursor.NW_RESIZE_CURSOR:
                            r.width -= p.x - start.x;
                            r.x = p.x;
                            r.height -= p.y - start.y;
                            r.y = p.y;
                            break;
                        case Cursor.W_RESIZE_CURSOR:
                            r.width -= p.x - start.x;
                            r.x = p.x;
                            break;
                        case Cursor.SW_RESIZE_CURSOR:
                            r.width -= p.x - start.x;
                            r.x = p.x;
                            r.height += p.y - start.y;
                            break;
                        case Cursor.S_RESIZE_CURSOR:
                            r.height += p.y - start.y;
                            break;
                        case Cursor.SE_RESIZE_CURSOR:
                            r.width += p.x - start.x;
                            r.height += p.y - start.y;
                            break;
                        case Cursor.E_RESIZE_CURSOR:
                            r.width += p.x - start.x;
                            break;
                        case Cursor.NE_RESIZE_CURSOR:
                            r.width += p.x - start.x;
                            r.height -= p.y - start.y;
                            r.y = p.y;
                            break;
                        default:
                            System.out.println("Unexpected resize type: " + type);
                    selectedComponent.setBounds(r.x, r.y, r.width, r.height);
                    start = p;
    }

  • Javax.swing.JPanel Help

    my application is sort of a game, i planned on having a JPanel subclass called EventPanel have an instance variable _curPanel.
    curPanel is of type JPanel. In the constructor  I can set curPanel to Other JPanel subclasses. I have another subclass of JPanel called MainScreen, which has the main screen for the game.
    I can set curPanel = new MainScreen(); in the constructor for eventPanel. And it works.
    But if I try to change _curPanel after i've made it, it wont show up. I have a method which signature 
    void setPanel(javax.swing.JPanel panel)
        _curPanel = panel;
        repaint();
    }to change the EventPanel, but nothing changes.
    In the MainScreen class there is a method call
    _eventPanel.setPanel(new NewPlayerPanel());and nothing changes in the code. I have a JTextArea logging info, and in the constructor for NewPlayerPanel at the end it prints a message in my JTextArea. The Panel is being created but not showing up.
    I have also tried creating the panel in an instance variable, setting it to setVisbile(true) and trying again and it doesnt work.

    In other words...
    char c=evt.getKeyChar();c is some character based on this event.
    if(c=='1'){Ok, let's say it is '1'...
    ...> char c2=evt.getKeyChar();Then c2 is also '1'.evt.getKeyChar() isn't going to magically change to be something different than it returned when you called it a few lines up before, so...>if(c2=='a')...this can never be true, given the above.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Redraw a JPanel during runtime

    Hi there,
    Im trying to redraw a whole JPanel during runtime.
    So basically I have this panel:
    public JPanel panel1 = new JPanel() {
         public void paintComponent(Graphics g) {
               super.paintComponent(g);
    }That panel is added to my JFrame during initialisation.
    I added an actionListener to a JButton that creates a whole new JPanel
    Then i try to set the default (panel1) to the new generated JPanel:
    public void actionPerformed(ActionEvent e) {
         if(e.getSource().equals(myButton)) {
         JPanel newPanel = generateNewPanel();
         panel1 = newPanel;
         panel1.validate();
         panel1.repaint();
    }After i done all that, it didn't redraw the jpanel
    Please advise on what I have gotten wrong.
    Thanks
    Edited by: Ruski on Mar 10, 2009 1:35 PM

    To be honest i recommend not using netbeans to code gui for a long term project which relies on code. NetBeans is useful - only for creating gui stubs and for throwaway gui prototypes but not in the long run, which is of my own experience. To be fair i have many years of coding gui's way back in the days when awt only started up.
    i know gui in java is "crap" because of it's repeated code and tedious mechanism to generate ui windows so to do that you might as well hard code it yourself using a proper or better IDE - "ECLIPSE" or any linux based code editors are good also. This way you learn much more about guis.

  • Problem in setting desired position for JPanel in JScrollPane!!!

    Dear Friends,
    I am having problem to set desired Scrollable(JScrollPane) JPanel position. I have a JPanel in a JFrame which is scrolable with lot of objects. It automatically displays on the top position inside JScrollPane, I want to set scroll position on the middle for the panel.
    I went through the search for the same in this forum, i found some posts related to this but they are linked with JTextArea(setCaretPosition). With JPanel i can't set caret position.
    Could anyone guide me how to set the scroll position on middle.
    Regards..
    Jayshree

    Replace:
    if(view.getValueAt(row,column) instanceof ImageIcon){
            ((Component)view.getColumnModel().getColumn(column).getCellRenderer().
            getTableCellRendererComponent(view,view.getValueAt(row,column),true,true,row,column)).setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
            ((Component)view.getColumnModel().getColumn(column).getCellRenderer().
            getTableCellRendererComponent(view,view.getValueAt(row,column),true,true,row,column)).setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
          }with:
    if(view.getValueAt(row,column) instanceof ImageIcon)
            view.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
           view.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

  • Adding noSwing component into Swing JPanel.

    Helo.
    I was wondering is there any chance to add button created using SWT library to Swing JPanel? Mamy someone did do this before?
    Thanks for any clue.
    Regards

    This begs the question: why on earth would you want to do this?
    I imagine it's possible through some monumental JNI coding, but the chances of it working well are slight and of breaking often are great. So again, why?

  • How to dynamically resize JPanel at runtime??

    Hello Sir:
    I met a problem, I need to resize a small JPanel called panel within a main Control JPanel (with null Layout) if I click the mouse then I can Drag and Resize this small JPanel Border to the size I need at runtime, I know I can use panel.setSize() or panel.setPreferredSize() methods at design time,
    But I have no idea how to do it even I search this famous fourm,
    How to dynamically resize JPanel at runtime??
    Can any guru throw some light or good example??
    Thanks

    Why are you using a null layout? Wouldn't having a layout manager help you in this situation?

  • I have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?

    i have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?reco

    You may get a better response in this community:
    https://discussions.apple.com/community/app_store/garageband_for_ios

  • Open a pdf in a swing jpanel

    I have a url for a pdf file and I want to open that file in a swing jpanel.I have upgraded to Java 1.6.0_27 and previously had 1.5.0_06
    In Java 1.5 ,I was using jdic to do this for that the user needed to download jdic setup on their desktop to view images
    but now I dont find any documentaion for java 1.6.0_27 and jdic setup.So i thought of doing this without the jdic .In java 5, I was using the beow code to show the pdf in swing jpanel.This basically embedds pdf in a web browser and then add it to swing jpanel.
    import org.jdesktop.jdic.browser.*;
    import org.jdesktop.jdic.browser.internal.*;
    WebBrowserUtil.enableDebugMessages(false);
    WebBrowserUtil.getDebug();
    WebBrowser webBrowser = null;
    URL pdfURL = testUrils.getPdf("Pathof .pdf");
    try {
    webBrowser = new WebBrowser();
    webBrowser.setDebug(false);
    webBrowser.setURL(pdfURL);
    } catch (java.lang.UnsatisfiedLinkError el) {
    catch (Exception e) {
    //System.out.println(e.getMessage());
    System.out.println("Error: " + e.getStackTrace());
    JPanel pantestBrowser= new JPanel();
    pantestBrowser.setLayout(new BorderLayout());
    pantestBrowser.setPreferredSize(new Dimension(700, 500));
    pantestBrowser.setLocation(0,0);
    pantestBrowser.add(webBrowser, BorderLayout.CENTER);
    I want to do the same thing without the jdic webbrowser.Is there a way out to do this?
    I tried to do with java.awt.desktop
    Desktop desktop=Desktop.getDesktop
    desktop.browse(pdfurl.toURI())
    This opens the pdf in a new adobe window and not inside the jpanel.
    Thanks,

    885522 wrote:
    I have a url for a pdf file and I want to open that file in a swing jpanel.I have upgraded to Java 1.6.0_27 and previously had 1.5.0_06
    In Java 1.5 ,I was using jdic to do this for that the user needed to download jdic setup on their desktop to view images
    but now I dont find any documentaion for java 1.6.0_27 and jdic setup.Have you tried to install and use jdic with 1.6 exactly as with 1.5?
    To be honest I don't find any documentation either, that would state jdic is independent of the JRE version (various links broken). But since jdic essentially provides a wrapping API to deal with native resources, I would assume it is relatively independant of changes that have occurred in the JRE between 1.5 and 1.6. At least I would try it :o)
    So i thought of doing this without the jdic .In java 5, I was using the beow code to show the pdf in swing jpanel.This basically embedds pdf in a web browser and then add it to swing jpanel.Does this code work with 1.6?
    I want to do the same thing without the jdic webbrowser.Is there a way out to do this?
    I tried to do with java.awt.desktop
    This opens the pdf in a new adobe window and not inside the jpanel.Yes, as documented by the Javadoc.
    Good luck.
    J.
    EDIT: please use code tags when posting code, to display it properly formatted. Like this: {noformat}this.isFormattedCode(){noformat}:
    this.isFormattedCode()

  • Help - Set XML /XSD data source at runtime(VC2003)

    The VC 2003 app loads a CR 2008  report without any issue.
    The CR report has an XML/XSD data source ,The spec has now changed to set XML/XSD data source at runtime.
    Anyone have any information /examples on changing a CR report XML data source at runt time in VC IDE. I can not update the app to .Net or port to JAVA ,only stuck with VC 2003.
    Thank you in advance.
    In VC IDE, is there away to set a crystal reports data source as an xml File without to import the xml into a dataset?
    Edited by: Tang Pat on Jan 12, 2009 6:45 AM

    duplicate - please do not post multiple times

  • Changing JPanels at runtime

    Hi guys,
    I'm writing a turorial apllication. I want to break down the information into JPanels, however I can't seem to swap between JPanels at runtime. I've tried calling validate and revalidate and then repaint... but I cant seem to get it working.
    This is probably a really common question but I couldn't find anything in the archives. Any help would be greatly appreciated.
    Cheers
    Stuart

    I'm assuming you're removing the old one before adding the new, in which case there isn't normally a problem so we'd have to see some code. Something I find works quite well for this is the CardLayout - check the docs. It lets you add a load of panels on top of one another and refer to each with a string. You then just call CardLayout.show("name") and this component comes to the top.
    hth

  • PHP 5.0.5 CLI: Am I able to set the Oracle home directory at runtime?

    I have two versions of Oracle installed on a SUN Solaris server:
    /opt/app/oracle/product/8.1.7
    /opt/app/oracle/product/9.2.0
    Am I able to set the Oracle home directory at runtime using PHP CLI?
    Thanks,

    The real answer is it depends how PHP loads Oracle. If the loading
    occurs when PHP starts and before your script executes then you will
    start to see problems. This could be as minor as missing error
    message text or it could be more subtle. In general set the Oracle
    environment before starting PHP.
    What about creating your scripts like:
    #!/bin/sh
    export ORACLE_HOME=/opt/app/oracle/product/9.2.0
    php ...-- cj

  • Javaclassnotfound javax.swing.JPanel in a applet

    Hi,
    I have a applet which use a class which have the code
    import javax.swing.JPanel;
    public class WebPanel extends JPanel implements Runnable{
    Applet parent;
    i compile it with jdk1.2.2
    my problem is that when i try to run the applet on a Internet Explorer navigator it give me a
    javaclassnotfound javax.swing.JPanel
    problem.
    Javax.swing.JPanel is�nt in IExploter?
    Should i put the javax.swing.Jpanel class in the jar fije?
    Where i can find it?
    Thanks in advance.

    forgot to mention this...get the plug in here:
    http://java.sun.com/products/plugin/
    read the intstructions, u might have to do some 'applet conversion' ....u'll know what I mean when u install the plugin
    good luck

  • How to set task description with paragraphs at runtime

    Hi Experts, How to set task description with paragraphs at runtime. Now, i can set single content in task description.however, not sure, how to set content which have paragraphs.

    Hi,
    You can use HTML tags in the Task descritption.
    Open the task not the workflow and there you can provide
    <p> content/containers </>
    You can use even <u>- Underlined text.
    <h> for bold text
    Thanks,
    Sarayoodharan.K

  • Setting up Custom Priorities for Taxonomy Attributes through Import Manager

    Hi,
    I want to set priority for "n" number of characteristics through Import Manager.
    I know Import manager allows us to set priority to one of the following : "Highest" "High" "Normal" "Low" "Lowest". But I have a requirement to set custom priority for each of the attribute through Import manager so as to avoid manual intervention.
    Has anybody worked on this before?
    Regards,
    Amol.

    Hi,
    Which special properties you are talking about ?
    I will just brief you the concepts of Hierarchy and Taxonomy
    Hierarchy
    Node1
    -    Node11
    -   Node12
    Node2
    -    Node21
      --         Node211
    Only leaf nodes can be assigned at the time of record creation.
    Taxonomy
    Used when particular hierarchy nodes needs some extra fields.
    Example: If your hierarchy is like
    Cars
        - Fiat
        - Maruti
    Bikes
        - Hero Honda
        - Bajaj
    Now for Cars, i want to store its Price but for Bikes i am not interested in Price but I want the Colour info. Now if you create the Price and Colour as fields of the repository then for all the records whose category is Cars will have NULL value for Colour and reverse in case of Bikes. Hence the concept of Taxonomy is introduced so that you can assign the fields (known as attributes) to the Nodes of the hierarchy.
    For Taxonomy Import, refer the below links
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30aa1447-80a1-2a10-e483-a76087bcb12f
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090d0bd-1da7-2a10-468f-bdd17badb396
    Regards,
    Jitesh Talreja

Maybe you are looking for

  • Slide to unlock screen doesn't work. How do I get it to work?

    Have had an iPad for years. Can't get the slide to work to unlock to my homepage screen. Tried shutting down and still nothing. Any ideas?

  • Recurring permissions issue - Notes & Mail crash

    I have a recurring permissions issue that seemingly ONLY happens after both Mail & Notes crash - and iMessage fails to message.  I can try to copy a file, it warns me I don't have permission.  I can open, but not save to origina same finger wag from

  • SAP DMS -  Material master - Document Data

    Hi, When I access the Document Data Tab (through mm03 - Additional Data - Document Data) the table shows only 2 lines witch refer to a DIR. Is there a note that makes it possible to see for example 10 lines? Are there any customizing settings to chan

  • Widget Info

    Hi Widget Gurus, I just came across the term widgets few days back, & I am very excited to know more about it. I am an abaper & would appreciate , if some body can guide to : 1.Good tutorials on SAP widgets. 2.Basic skill sets to start writing code f

  • Find number of attachments

    How can I find the number of attachments in a message? I've done some research, but still can't figure it out :(