JTabbedPane problem! its urgetnt

this is the tabbedpanel i wanted to create but has some problem..
the connected panels dont show their content.
the tabbed panel shows but the linked panels dont.
wats the prob wid it!!
public class tabbedpane extends JApplet
public void init()
JTabbedPane jtp=new JTabbedPane();
jtp.addTab("searchbook",new searchbook());
jtp.addTab("searchmember",new searchmember());
getContentPane().add(jtp);
class searchbook extends JPanel
public searchbook()
setLayout(null);
JTextfield txt1=new JTextField();
setBounds(40,40,120,20);
add(txt1);
JRadioButton rb1=new JRadioButton("by name");
setBounds(40,60,60,20);
add(rb1);
JRadioButton rb2=new JRadioButton("by author");
setBounds(40,80,60,20);
add(rb2);
class searchmember extends JPanel
public searchmember()
setLayout(null);
JTextfield txt2=new JTextField();
setBounds(40,40,120,20);
add(txt2);
JRadioButton rb1=new JRadioButton("by id");
setBounds(40,60,60,20);
add(rb1);
JRadioButton rb2=new JRadioButton("by name");
setBounds(40,80,60,20);
add(rb2);
plz help!!!very urgent......

take a look at the constructors of the classes searchbook and searchmember
when basicaly you have multipls of following code
Component comp = someComponent();
setBounds(blah, blah, blah...);
add(comp);the problem is in the set bounds call you are setting the bounds of the container not the component so the code should be corrected as
Component comp = someComponent();
comp.setBounds(blah, blah, blah...);
add(comp);And please use code tags when you post codes. It is very deficult to read the code without them fortunetly for you I was in a strange mode so I read your code and that will not happen next time

Similar Messages

  • I know why coming ios 7 for ipod 4g. this is not my problem its your problem , please make for ipod 4g

    i know why coming ios 7 for ipod 4g.
    this is not my problem its your problem
    , please make for ipod 4g

    mohammad mhp wrote:
    iknow about this
    i like apple make ios 7 for 128 or 256 RAM
    plz i want it
    Apple would have to strip so many features out of iOS 7 to make it work on your iPod that about all you'd have would be iOS 6 with different icons. So as the others have said, this is not going to happen. If you want iOS 7, you'll need a newer iPod.
    Regards.

  • HT4623 my iphone 5 is not getting audio during calls, im not hearing anything unless i put it on speaker. Can you help me is this a software problem its very annoying for every call i dial or recieve i have to put on speaker. Please help me apple please.

    my iphone 5 is not getting audio during calls, im not hearing anything unless i put it on speaker. Can you help me is this a software problem its very annoying for every call i dial or recieve i have to put on speaker. Please help me apple please.

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • My iPad screen is not responding, whats the best way to clean it and what could be the problem, its 2 days old

    my iPad screen is not responding, whats the best way to clean it and what could be the problem, its 2 days old

    Braunzoes wrote:
    my iPad screen is not responding, ...
    Try a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    Braunzoes wrote:
    ... whats the best way to clean it ...
    How to Clean Apple Products
    http://support.apple.com/kb/HT3226
    Braunzoes wrote:
    ... its 2 days old
    iPad User Guide iOS 6

  • My macbook Pro 13" 2013 has a mouse problem, its not moving naturally, and keeps on moving around like its dancing. Please help solve this!!

    My macbook Pro 13" 2013 has a mouse problem, its not moving naturally, and keeps on moving around like its dancing. Please help solve this!!

    Go step by step and test.
    1. Restart
    2. Shut down the computer.
        Clean the trackpad with moist not wet microfiber cloth.
        System Preferences > Point & Click
        Try turning off three finger dragging and then turning it on after  testing.
    3. Is there any Bluetooth device nearby with failing batteries? If so, replace the batteries.
      4. Reset PRAM:   http://support.apple.com/kb/PH14222
    5. Reset SMC.     http://support.apple.com/kb/HT3964
        Choose the method for:
        "Resetting SMC on portables with a battery you should not remove on your own".
    6. Close all windows and quit all applications.
        Click the Spotlight -the magnifying glass icon- in the menu bar. Enter Disk utility in the box.
        Select Disk Utility from the drop down. When the Disk utility window opens up,
        select  Macintosh HD, then First Aid.
        Click Repair Disk Permissions button.
        Ignore the  time remaining estimate.
        Last 1 minute may take longer.

  • Insert tab in jTabbedPane problem

    Hi,
    I am trying to insert a tab into a JTabbedPane using this method:
    insertTab(String title, Icon icon, Component component, String tip, int index)
    It works fine - the tab is inserted to the right place on the GUI, but the problem is this - though the tab is inserted at the right location in the GUI, when I traverse through the JTabbbedPane, I see that the new tab is inserted at the last index!
    Can someone let me know how to fix this problem?
    Thanks

    Here is the example code:
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextArea;
    public class TabbedPaneTest {
        public static void main(String[] args) {
            JTabbedPane tp = new JTabbedPane();
            tp.add("tab0", new JPanel());
            tp.add("tab2", new JPanel());
            tp.add("tab3", new JPanel());
            tp.insertTab("tab1", null, new JTextArea(), null, 1);
            for (int i=0; i<tp.getComponentCount(); i++) {
                System.out.println("TabComponent"+i+": "+tp.getComponent(i));
    }The output of this test program is:
    TabComponent0: javax.swing.JPanel...
    TabComponent1: javax.swing.JPanel...
    TabComponent2: javax.swing.JPanel...
    TabComponent3: javax.swing.JTextArea...
    You can see that the JTextArea is not inserted at index 1 as expected.
    But I found the solution for this problem myself. If you replace tp.getComponent(i) by
    tp.getComponentAt(i) the program output is:
    TabComponent0: javax.swing.JPanel...
    TabComponent1: javax.swing.JTextArea...
    TabComponent2: javax.swing.JPanel...
    TabComponent3: javax.swing.JPanel...
    and this is what I need!!!

  • Linked server problem, its works locally but not from remote machine

    Hi,
    i am using the application NAV and have written the query in the application. am using automation variable to link to the SQL Server.
    The problem is that , the query which i have written executes only when i am working on local machine .
    I mean when i want to execute the same query from remote machine through my app Dynamics NAV then its not getting executed.
    Thanks in advance

    Depends on what you are trying to do and what security you are using.
    What error did you get?
    If you are using windows authentication then take a look at delegation
    http://www.databasejournal.com/features/mssql/article.php/3696506/Setting-Up-Delegation-for-Linked-Servers.htm
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • JTabbedPane problems

    hi,
    i have a JTabbedPane and i initialize it with 5 tabs as follows
    public class Frame1 extends JFrame
    static JTabbedPane jtp= new JTabbedPane();
    static JList jl;
    static JTextArea jta;
    jtp.setBounds(new Rectangle(1, 192, 336, 308));
    jtp.setBorder(border16);
    jtp.addChangeListener(new mychangelistener());
    for(int i = 0; i < 5; i++) //initialising the tabbed pane with 5 tabs
    JPanel jp= new JPanel();
    jl= new JList();
    jta= new JTextArea();
    JScrollPane jsp1= new JScrollPane();
    JScrollPane jsp2= new JScrollPane();
    jp.setLayout(null);
    jp.add(jsp1, null);
    jp.add(jsp2, null);
    jsp1.getViewport().add(jl, null);
    jsp1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jsp1.setBounds(new Rectangle(6, 5, 315, 165));
    jsp2.getViewport().add(jta, null);
    jsp2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jsp2.setBounds(new Rectangle(6, 176, 315, 80));
    jtp.addTab(tabnames.getText(), jp);
    jtp.setEnabledAt(i, false);
    class mychangelistener implements ChangeListener
    public void stateChanged(ChangeEvent e)
    int x = Frame1.jtp.getSelectedIndex();
    switch(x)
    case 0:
    Frame1.jta.append("tab1");
    break;
    case 1:
    Frame1.jta.append("tab2");
    break;
    the problem i am having is that when tab2 is selected nothing prints in the text area of that tab, it works fine for tab1 tho. i dont think iam referencing the right component by just saying jta.append.. can someone please tell me how to go about doing this?
    thanks
    maulin

    When you post code use the formatting tags so the code is readable. Click on the "Formatting Help" the next time you post a question.
    the problem i am having is that when tab2 is selected nothing prints in the text area of that tab, it works fine for tab1 tho.I don't know how it works for tab 1 since the "jta" variable references the last JTextArea created. Why don't you create an array so you can store all five references to the individual text area.

  • JTabbedPane and its accompanying ChangeListener.

    Hi all,
    I have a JTabbedPane with two tabs and a ChangeListener. If I click on a single Tab I check in the stateChanged-Method via "((JTabbedPane)event.getSource()).getSelectedIndex()==0" the selected Index of the tab.
    This works fine.
    But If I generate a PopUp-Event in a selected tab the program branch also in the TabbedPane-Change-Listener and if I check now via "((JTabbedPane)event.getSource()).getSelectedIndex()==0" the selected index is not correct !?
    What goes wrong ?
    incs

    Ok. The problem is solved ! The changelistener-method was access through a refresh event and not through a "chlick-tabbedpane-event".

  • Swing JTabbedPane problem!!!!!!!!

    hi guys
    i create the UI by GUI builder of NetBeans IDE. i want to add two JPanels in JTabbedPane. But the everytime i drag the JPanel into JTabbedPane. NetBeans will generate the code and arrange two JPanels by GroupLayout. i dont want to have GroupLayout to mange the these two JPanels in JTabbedPane.
    Also i know i to do it by coding manually. But I want to execute in NetBeans. Is there any properties i have to change in Netbeans.
    thanks in advance

    I'm currently running jdk1.6.0, although the problem occurred while running on jdk1.5.x as well. It should be noted that I'm running this on Linux, using the official JDK from Sun (not gcj or anything of the sort). The application is written in pure Swing, no AWT canvases etc. Thus far, all testing has been performed exclusively on Linux and in all cases the results have been the same (I've tested with at least 2 distributions: Slackware and Mandriva 2007).
    As for development tools, the problem occurs both with the new Netbeans 5.5 (and possibly older versions, though I haven't checked) as well as eclipse running the MyEclipseIDE plugin which contains a port of the Netbeans Matisse GUI development framework. While it is possible the IDEs are generating poor code, I doubt that is the problem.
    I'll need to set up a Windows box and try it out on that. If the problem still occurs, I'll write a minimal program to replicate the problem and post it here.
    Thanks for the replies

  • When I try to sync my iPod Touch it says, "The iPod "[ipod name here] cannot be synced. An unknown error occurred (13019)."  This is a huge problem. its been happening for some time now. Help me please?

    Every single time, it'll do the regular sync thing then a little pop up comes up and says "The iPod "[ipod name here]" cannot be synced. An unknown error occurred (13019)." ***? I have searched all over for troubleshooting help. I'm exhauseted. Can anyone help me with this pestering problem? I've lost all the music that I bought on my iPod because it didn't sync up with my computer and when it tried to, it took everything away. Help <3 ?

    I have searched all over for troubleshooting help.
    Doublechecking. In the course of your troubleshooting to date, have you worked through the following document?
    iTunes: Error 13019 during sync

  • JTabbedPane problem

    Hi all,
    I'am trying to do a swing xml editor.My editor have undo/redo function.I use JTabbedPane because i want the user to be able to open multiple file :
    undobutton | redobutton +('this are undo redo buttons with ActionListener ;buttons are not include in JTabbedPane obj')+
    file1.xml | file2.xml | file3.xml +("this is my JTabbedPane")+
    Let say i wrote smth. in all files above,and later file1.xml is selected :If i push undobutton it makes changes in all three files,but i want to undo content only in file1.xml

    It's looking like you're creating a CompoundUndoManager for each text pane, and then adding each CompoundUndoManager's undo and redo actions to your buttons as listeners. Thus each time you click one of the buttons, all of the undo (or redo) actions for all text panes will be notified.
    If you have multiple editors in an application, and a toolbar with an "undo" and "redo" button, you should probably add a TextAction to each button that determines the text component that is currently active (TextAction provides methods to do so), then grab that text component's UndoManager and have it undo/redo. That way you're only ever undo/redoing stuff on the currently active text component.
    If you need further help, you'll have to post an SSCCE. Note that an SSCCE is not just a code snippet of your current application.

  • Webcam NX problem - its not being detected

    its not detecting the camera - I have everything installed - and it used to work before - now for some reason when I plug it into the USB port its not being recognized as being plugged in or anything - help!

    Stormhammer wrote:its not detecting the camera - I have everything installed - and it used to work before - now for some reason when I plug it into the USB port its not being recognized as being plugged in or anything - help!
    :manmad: Same Same , wen im on msn people can see i have a webcam but wen i clik on it it says it is not detected, it worked on mi old computer =/

  • HT201321 Numbers pad 4 5 6 and the up down arrow key quit working. I swithched keybouards (Both are Apple, and still have the same problem, its not hardware.)

    The 4 5 6 keys and the up down arrows do not work.
    I had the Cap C off for a While Had hit some key command
    that shut it off so I got a new keyboard and it did the same.
    HAs anyone had this problem

    Does the problem happen if you reboot the system into Safe Mode by holding the Shift key at startup?
    Additionally, does the problem happen if you create a new user account in the Users & Groups system preferences and log into that?

  • Webdynpro table sorting problem, its hiding the table while sorting

    Hello All,
    I have a stardard webdynpro application in our portal, when i am pressing sorting button on a table it is hiding the table,
    please share your idea and please help me to get it resloved,
    Cheers,
    Appa

    Hi Appa,
    let's try to narrow down the problem:
    please tell us which application it is about. Is it reproducible for any kind of table in any other standard webdynpro for java applications, or only for this one? Do you face this problem when you use any kind of browsers like firefox, internet explorer?
    Thank you!
    Best Regards,
    Ervin

Maybe you are looking for

  • Mic problem with skype

    Not sure what the problem is. My mic seems to be working but skype does not recongnize. it used to work but now it does not.  Only change that i can see in upgrading to mountain lion.

  • QuickTime always has static noise while playing audio

    Every time I open an mp3 (or any audio file) in QuickTime, it plays a lot of static noise in the background.  These audio files work fine in other applications (iTunes, VLC, etc) so i know the problem lies with QuickTime.  I have tried re-installing

  • Invoke-sqlcmd with domain user name and password

    I am trying to execute below small SQL script from powershell by passing my domain user name and password..but it is throwing an error login failed for the user. Howerver I am able to execute the same query by passing normal user 'non domain' and pas

  • Data Truncated

    Hi Gurus,               I added a field to 0Customer_Attr called SORT1 and its size is 20 chars. I written the logic in user exit which pulls the data from differenct table called ADRC.               I am getting right values in Sort1 but I can see o

  • Phone shuts down when pairing with bluetooth

    I've had a Samsung Renown for a while and just installed a new hands free device in my car. When I pair the phone with the HFD or pair the HFD with the phone, it connects, then the phone reboots and the connection is lost. Any ideas ?