How can i fill the JTree form database?? please help

Dear all
my database is MS Access
I have two tables
-Countries table contain country_id and country_desc
- cities table contain city_id,city_desc,country_id
i need to make a tree with countries and cities
my class as follow:
public class SystemFrame extends JFrame {
private JPanel panelCenter = new JPanel();
private JLabel statusBar = new JLabel();
private JTree systemTree = new JTree();
// constructor
public SystemFrame() {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
private void jbInit() throws Exception {
this.getContentPane().setLayout( layoutMain );
panelCenter.setLayout( null );
this.setSize( new Dimension(400, 300) );
this.setTitle( "Country Menu" );
statusBar.setText( "staus bar" );
systemTree.setAutoscrolls(true);
systemTree.setBorder(BorderFactory.createTitledBorder("Country Menue"));
systemTree.setForeground(Color.red);
systemTree.setToolTipText("Select desired city");
this.getContentPane().add( statusBar, BorderLayout.SOUTH );
this.getContentPane().add( panelCenter, BorderLayout.NORTH);
this.getContentPane().add(systemTree, BorderLayout.CENTER);
this.setVisible(true);
public static void main(String args[]) {
SystemFrame frm = new SystemFrame() ;
i need to fill my JTree with data in tables. I do not know how
Please help

You need to implement a tree model to describe your data structure.
Start from reading the java doc about javax.swing.tree.TreeModel

Similar Messages

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • How can I fill in a form, save the form such that it cannot be further altered, and email it as it was saved?

    How can I fill in a form, save the form such that it cannot be further altered, and email it as it was saved?  I created a form with 5 fields.  It is a form letter that is intended as a receipt for funds received.  I want to fill in the date, name, amount received, etc., save the form with inserted data fields so they can't be further altered, and be able to email it as a complete unalterable PDF document.  What I'm doing now, is filling in the fields, printing it, scanning it, and emailing it as an unalterable document.  The document was created on a Mac using Adobe Acrobat Pro version 10.1.13.  The document is filled in on a PC that only has Adobe reader on it, printed, scanned and emailed as an attachment. There must be a better way! 

    If you have access to a ASP.net Web Server, then the submission could be FLATTENED with FDFToolkit.net and emailed without client-side email software by only using Adobe Reader.
    For more information check out the following websites:
    http://www.pdfemail.net/examples/
    http://www.fdftoolkit.net/examples/

  • How can I fill a pdf form with Excel?

    I have a pdf form and a set of Excel dates. How can I fill the form with this dates?
    Is there any way to transform excel dates into a fdf-File?
    Thank You for helping
    Hans

    I see. That's possible, in theory, but it requires using a complicated custom-made script.
    I would suggest using that Mail Merge option that's available in some versions of Excel to produce multiple single-page files, then flatten all of them (using an Action), and then merge them to a single file, to achieve the same result with much less effort.

  • How can i fill the iTunes Connect ITIN?

    Hi,
    i am trying to sell the book on iBookstore but i can't find tge way how can i fill the ITIN on form.
    i am living in istanbul.
    i am non-US person.
    Any idea?
    Any help?
    Thanks.

    You would need to try to contact support for content providers, the standard support system at apple wouldn't be able to help much with this as they pretty much handle the consumer end of support and not the provider/developer, Only support for that I could find is available at http://www.apple.com/itunes/content-providers/

  • How can i find the installed forms version in 6i...?

    Dear all,
    How can i find the installed forms version in 6i, the situation is we have given a solution which will work in only forms6i latest version, before implementing the same we need to check whether the forms latest version has been installed or not
    Is there any way to find out without opening the forms builder..?
    Even if we un install the forms from a machine, the forms60_path variable will remain in regedit, so we cannot go based on that and aslo i dont know whether regedit will have the version details and all.
    It would be greatly appreciated if any one can give a solution.
    Thanks in Advance.
    Thangaraj.

    you query the registry, the registry has the version number saved, but I cannot remember exactly where and I don't have 6i Installed on my machine.
    You just open the Forms Builder and click on Help/About.
    But Jan's method is the best.

  • How can I fill a pdf form?

    how can I fill a pdf form?

    With Adobe Reader.  If you have any difficulties, please provide some details.

  • How can i find the adobe form translations

    Hi Friends,
    how can i find the adobe form translations?
    i mean i want to know in how many languages my adobe form has been translated?
    is their any report or is their any technique to find the translations........................
    Thanks,
    Harish.K

    Hello Harish,
    To find the translation of Adobe form is nothing but to find the labels or texts used in this adobe form in various languages. This will give you an idea on how many languages your adobe form has been translated.
    So to find the translations in different languages, you have to go to Context node of the Adobe form. Then go through the text nodes which are used as labels. These will be normally stored as Standard texts in SO10.
    For example. Take the text name of any one text node.
    1) Go to SE38.
    2) Type program RSTXTRAN.
    3) Let the Text key - object be TEXT.
    4) Then enter this text name in the field Text key - name. I have put the sample standard text ZTEST_ADOBE as shown below.
    5) Let the Text key - ID be ST.
    6) In Text key - language, Enter *  (i.e enter the Asterisk) because you want to find out all the languages.
    The screen parameters will be as shown below.
    7) Now Execute this report.
    8) It will show all the various languages in which this particular standard text is used which is nothing but the Adobe form is being used in these many languages. For example, the standard text ZTEST_ADOBE is used in 3 languages, English, German and Spanish as shown below. It will look as shown below.
    Note: This will give you the more or less the overall idea of the form that has been used in these many languages. But also make sure the standard text with particular language is also linked with the Transport Request. Because there are chances that the text was created in a particular language but was never used.

  • Please help...I was downloading my pics from the SD card. I then I highlighted 5 pics and selected erase, once I selected erase 20 other pics was also erase. I need to know how can those erase pics be recovered? Please Help!

    Please help...I was downloading my pics from the SD card. I then I highlighted 5 pics and selected erase, once I selected erase 20 other pics was also erase. I need to know how can those erase pics be recovered? Please Help!

    You will need data recovery software. See this post:
                                                                                       Re: I accidentally lost 3 weeks of photos, how do I recover them?                                            
    And please send feedback to Apple: This is a bug. Only the imported photos should have been deleted, not all photos on the card. You can use this form: Apple - iPhoto - Feedback

  • HT1766 I recently replaced my iphone and took 6 weeks of new pictures, I plugged it to my computer and by accident I restored the back from 4 months ago and erased my new pictures. How can I recover the new pictures ?? Help!!

    I recently replaced my iphone and took 6 weeks of new pictures, I plugged it to my computer and by accident I restored the back from 4 months ago and erased my new pictures. How can I recover the new pictures ?? Help!!

    Sorry those pics might be gone, since you restored from your backup.
    Only way possible if by some possibility you were able to backup your current data to itunes, then you can restore from that backup.
    Open itunes - edit - preference - devices - backup - see if there is an up to date backup.
    If you don't have one then sorry those pics are gone.

  • When I zoom in on photo using iPhoto, how can I save the zoomed in photo please?  This always looks better than cropping., When I zoom in on photo using iPhoto, how can I save the zoomed in photo please?  This always looks better than cropping.

    When I zoom in on photo using iPhoto, how can I save the zoomed in photo please?  I would like a screen shot of my zoomed in photo - is this possible?.  Cropping doesn't give the same effect as zooming in and magnifying the photo.  Any help would be appreciated thank you.  I have an iMac

    To take a screenshot of the zoomed photo, press either the key combination
         ⇧⌘3   for a screenshot of the full screen, or
         ⇧⌘4   to bring up a selection rectangle: select the section of the screen, that you want to save.
    The screenshots will be sent to your desktop; drag them from there to the iPhoto icon in the Dock to import them.

  • I have iOS 6 on my iPhone. i have linked my contacts with facebook and yahoo, which has doubled or triplicated some of the contacts. how can i integrate them into one? please help. it is getting on my nerves. thanks :)

    I have iOS 6 on my iPhone. i have linked my contacts with facebook and yahoo, which has doubled or triplicated some of the contacts. how can i integrate them into one? please help. it is getting on my nerves. thanks

    click on the contact which you want to integrate, click the edit button scroll down u will find a option called link contacts use it to link it to the duplicate contact

  • All the my messages from my phone inbox disappeared.Why did it happen and how should i get the messages back?please help

    All the my messages from my phone inbox disappeared.Why did it happen and how should i get the messages back?please help

    Is the MacBook the computer you have synced with in the past? If not you can use the computer that you have synced with to restore your apps. Are you sure you are using the same Apple ID that you used to purchase the Apps?

  • Why in my iPhone 6 has no FaceTime and how can i download it??? please help me.

    why in my iPhone 6 has no FaceTime and how can i download it??? please help me.

    If Facetime is not present on the phone you have, you cannot download it. The model of phone you purchased cannot have Facetime on it, period.
    There is nothing to be done to download it - it's not possible.
    ~Lyssa

  • Hi. There is a ghost search bar on my iMac screen which flashes constantly, even during start up and shut down. How can i make this go away? Please help. x

    Hi There is a ghost search bar on my iMac that flashes continually, even during start up and shut down. How can i make this go away? Please help. x

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

Maybe you are looking for

  • Is there any standard extractor for AFD provided by SAP?

    Hi. We are planning to implement SEM-BCS ? From this forum and  SAP documentation( help.sap.com and service.sap.com), I just found that integration with ECC is total records(RFD) and some master data. Unfortunately, I could't  find any further integr

  • Operating unit access is not allowed.check that you have access to OU

    Hello, I am working on supplier conversion. 11i to R12 (Linux). Old DB is 9i and new is 11g. I am getting the below error when i am trying to upload supplier site msg count2 Status E Vendor site id Party site id Location id return_status: E l_msg_dat

  • MacBook Pro Video capture problem

    Hi....Can someone help me please..Im using MacBook Pro late 2011 model, OSX 10.9.4, 16 GB RAM, 120 GB HDD Free space. Having problem to capture my footage from my Panasonic 102B (miniDVTape) camera. Only i sight camera appear in i movie or FCP X. Wha

  • X2 Bluetooth Speakers

    Hi there, I have just bought 2 Sony Bluetooth speakers for my Macbook, they are identical. I do NOT want to use them both at the same time, 1 is for upstairs and 1 is for downstairs. But I can only get 1 working. I think it is because they are identi

  • Can I save $ while integrating my IPhone? Can I use my BB USB Power Adaptor

    I'm extremely happy with my IPhone (3G-16)... but for anyone who doesn't own a lot of Apple stock, or oil futures, times are tight. I need a second USB power adapter. Can I simply plug my IPhone USB cable into one of the myriad of plugs which I have