Results 1 to 2 of 2
  1. #1
    ankit1801 is offline Member
    Join Date
    Mar 2011
    Rep Power

    Exclamation Displaying HashMap in a JFrame

    i have a HashMap<String, Integer> which i need to print in a JFrame. i have created the frame but dont know how to print the hashmap. i have not worked with HashMaps. How do i do this?

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Rep Power


    Read the Java API for HashMap and see what methods it has to allow you to retrieve data. Iterate over the Map, get data, add to JTextArea or JTable or whatever you use to display.

Similar Threads

  1. JFrame(window) not displaying at all
    By mojisolaowoeye in forum AWT / Swing
    Replies: 1
    Last Post: 07-02-2010, 01:03 PM
  2. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  3. Replies: 7
    Last Post: 12-08-2009, 08:17 PM
  4. Passing data from one JFrame to another JFrame
    By tarami in forum New To Java
    Replies: 3
    Last Post: 08-06-2009, 05:44 PM
  5. Replies: 4
    Last Post: 04-22-2009, 11:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts