Urgent help needed - writing/ reading to/from file

hi all..
can anyone help me with this problem:
The problem dioscussed in www.javaworld.com forum
any clues what the problem is??

hi all...
i managed to get the gui set up, and the JList is finally loading the data,
yet, i am having problems with displaying relevant data of each item in the list...
could you please help??
// required imports
   import javax.swing.*;
   import java.awt.*;
   import java.awt.event.*;
   import javax.swing.event.*;
   import java.io.*;
   import java.util.*;
// ViewPanel class: the panel for the view pane. handles its own events.
   public class ViewPanel extends JPanel implements ListSelectionListener
      private JList list;
      private DefaultListModel listModel;
      private JButton deleteButton;
      private TicketStorage data;
   // add pane items
      private JLabel seat, seatData;
      private JLabel name, nameData;
      private JLabel duration, durationData;
      private JLabel price, priceData;
      private JCheckBox waiterService;
   // creating panels
      JPanel p1 = new JPanel();
      JPanel p2 = new JPanel();
      public ViewPanel(TicketStorage data)
      // store data structure reference
         this.data = data;
         TrainTicket[] summary = data.summary();         
         listModel = new DefaultListModel();
         for (int i = 0; i < summary.length; i++)
            listModel.addElement(summary.getSeat());
list = new JList(listModel);
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.setSelectedIndex(0);
list.setVisibleRowCount(5);
JScrollPane listScroller = new JScrollPane(list);
listScroller.setPreferredSize(new Dimension(100, 150));
seat = new JLabel("Seat No:");
seatData = new JLabel();
name = new JLabel("Name:");
nameData = new JLabel();
duration = new JLabel("Duration:");
durationData = new JLabel();
price = new JLabel("Price:");
priceData = new JLabel();
// create add pane items
waiterService = new JCheckBox("Waiter Srevice");
waiterService.setEnabled(false);
// waiterService.addActionListener(boxListener);
JButton deleteButton = new JButton("Delete");
// deleteButton.addActionListener(buttonListener);
// adding listeners to the components
//deleteButton.addActionListener(this);
//waiterService.addActionListener(this);
list.addListSelectionListener(this);
// adding the components to their coreesponding panels
p1.setLayout(new GridLayout(5,1));
p1.add(seat);
p1.add(name);
p1.add(duration);     
p1.add(price);
p1.add(waiterService);
p2.setLayout(new GridLayout(5,1));
p2.add(seatData);
p2.add(nameData);
p2.add(durationData);     
p2.add(priceData);
p2.add(deleteButton);
this.setLayout(new GridLayout(1,3,3,0));
this.add(listScroller);
this.add(p1);     
this.add(p2);
public void valueChanged(ListSelectionEvent e)
if (e.getValueIsAdjusting() == true)
// enable the delete button when an item is selected
deleteButton.setEnabled(true);
// retrieve the sellected seat number value
String itemSellected = listModel.getElementAt(list.getSelectedIndex()).toString();
// retrieve the ticket with the sellected seat number
TrainTicket tk = data.retrieve(itemSellected);
// load the relevant data of a sellected ticket
seatData.setText(tk.getSeat());
nameData.setText(tk.getName());
durationData.setText(Integer.toString(tk.getDuration()));
priceData.setText(Double.toString(tk.getPrice()));
/*/ if the selected ticket of type first class
if(tk instanceof FirstClassTicket)
if(((FirstClassTicket)tk).getWaiter()==true)
waiterService.setSelected(true);
waiterService.setEnabled(true);
else
waiterService.setSelected(false);
waiterService.setEnabled(true);
else
waiterService.setSelected(false);
waiterService.setEnabled(false);
the application runs, it loads the data available in the linked list,
yet, on switching from an item to another in the list, it keeps generating errors!!!
in addition to the fact that it does not display the data!!
for more info refer to the url in my first post!
any clues??

Similar Messages

  • Urgent help needed with reading data from Cube

    Hi Gurus,
    Can anyone tell me how to read a value from a record in the CUBE with a key (combination of fields).
    Please provide if you have any custome Function Module or piece of code.
    Any ideas are highly appreciated.
    Thanks,
    Regards,
    aarthi

    Due to the nature of the cube design, that would be difficult, that's why there are API's, FMs, and MDX capabilities - to eliminate the need to navigate the physical structure.  Otherwise you would have to concern yourself with:
    - that there are two fact tables E and F that would need to be read.  The Factview could take of this one.
    - you would want to be able to read aggregates if they were available.
    - the fact table only as DIM IDs or SIDs (for line item dims) to identify the data, not characteristic values.  A Dim ID represents a specific combination of characteristic values.

  • Urgent Help Needed regd reading a file in apex

    Hi all,
    I need to know how can we store content of a file in a variable or any item(like text box).
    i have a os user name in the file.
    when i use apex_util.get_file it is opening in new page.
    instead i want it to stored in a text box or any variable.
    cany any one help me on this.
    Thanks in advance,
    Srini
    Message was edited by:
    user650963

    Hi Srini,
    You can use the normal file upload functionality to do this.
    1 - Create a page region and add in a File Browse item - I'll call it P1_FILE_NAME
    2 - Create a button in that region, I'll call it P1_UPLOAD_BUTTON, and set it to branch back to the same page
    3 - Create a TextArea item - I'll call it P1_FILE_CONTENTS
    4 - Create a page process, called P1_UPLOAD_FILE, and triggered by the P1_UPLOAD_BUTTON
    5 - Use the follownig code for the process:
    declare
    v_clob clob;
    v_blob blob;
    v_varchar2 varchar2(30000);
    BEGIN
    SELECT blob_content into v_blob FROM APEX_APPLICATION_FILES where name = :P1_FILE_NAME;
    v_clob := wwv_flow_utilities.blob_to_clob(v_blob,'utf-8');
    :P1_FILE_CONTENTS := wwv_flow_utilities.clob_to_varchar2(v_clob);
    :P1_FILE_NAME := '';
    delete from APEX_APPLICATION_FILES WHERE NAME = :P1_FILE_NAME;
    END;When you select the file and click the Upload button, the file is uploaded into the APEX_APPLICATION_FILES table. The contents of the file is put into a BLOB field. The above code, converts that BLOB into a CLOB and then into a VARCHAR2 value - you can then change P1_FILE_CONTENTS to that value. Finally, the code removes the file from the table and resets the File Browse field.
    Note that this assumes that the file contains nothing but text and is no more than 30,000 characters in length.
    Andy

  • Urgent help needed - writing japanese into the applet code from servlet

    Hi,
    I have a jsp file which writes an applet as well as a popup menu on the applet. All the menu items and applet text displays japanese character.
    Two menu items on this popup menu are written by the same jsp while three dynamic menu items are written by a servlet which does so by writing a response back to the jsp.
    My problem is when I write the popup items from the servlet it doesn't display the japanese character but something like this "-- $B?7$7$$$*5RMM$rA*Br(B --"
    I am sure that something wrong in the way I write into the response in the SERVLET because JSP writes japanese menu items fine.
    my code in servlet is like this.
    response.setContentType("text/plain;charset=ISO-2022-JP");
    PrintWriter output = response.getWriter();
    output.println(\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u30ec\u30dd\u30fc\u30c8);
    I have set the font family to, font-family: gothic, mincho, arial unicode ms; in the jsp that takes care of displaying everything propertly but the MenuItems from the servlet :(
    Please write back if you have the solution.
    Thanks,
    preeti..

    i don't know exactly,but ithink that the problem is about the ISO-code
    japanese has got another number

  • Help needed in reading data from a Crystal Report

    I am trying to read data values from a saved crystal report. (groovy code snippet below)
    I open a new ReportClientDocument and set the RAS using the inprocConnectionString property.
    Then I get the rowsetController and set defaultNumOfBrowsingRecords, rowsetBatchSize and maxNumOfRecords all to 1000000
    Using the browseFieldValues method after that returns only 100 records. I want to get all.
               ReportClientDocument clientDocSaved;
           def pathout=rc.pathToSavedReports+rr.path;
         //****** BEGIN OPEN SAVED SNAPSHOT ************
         clientDocSaved = new ReportClientDocument();
         clientDocSaved.setReportAppServer(ReportClientDocument.inprocConnectionString);       
            // Open report
         println("Reading file in.")
         clientDocSaved.open(pathout, OpenReportOptions._openAsReadOnly);
           def rowsetController = clientDocSaved.getRowsetController()
         rowsetController.setDefaultNumOfBrowsingRecords(1000000)
         rowsetController.setRowsetBatchSize(1000000)
         rowsetController.setMaxNumOfRecords(1000000)
         //setup metadata
         IRowsetMetaData rowsetMetaData = new RowsetMetaData()
         Fields fields =  clientDocSaved.getDataDefController().getDataDefinition().getResultFields()
         rowsetMetaData.setDataFields(fields)
         def values = rowsetController.browseFieldValues(fields.get(0), 1000000)
         values.each{value->
            println(value.displayText(new Locale("ENGLISH")))
    Before using the browseFieldValues method I was trying to use a rowsetCursor
                //get the rowset cursor to navigate through the results
                RowsetCursor rowsetCursor = clientDoc.getRowsetController().createCursor(null, rowsetMetaData)
                //navigate through the rowset and log the name and value
                rowsetCursor.moveTo(0)
                while(!rowsetCursor.isEOF()){
                     Record currentRecord = rowsetCursor.getCurrentRecord()
                     //println("current record number: " + rowsetCursor.getCurrentRecordNumber())
                     for(int i=0;i<fields.size();i++){
                          //println("Column - "+fields.get(i).getName())
                          if (currentRecord.size()>0){
                              println(currentRecord.getValue(i))
                     rowsetCursor.moveNext()
    the currentRecord was always an empty list and I did not get any data values at all.
    Am I missing something in using these approaches?
    I'm fairly new to using the Java SDK for CR. Any help will be greatly appreciated.
    Thanks

    hi, I am trying this second method to read the values from report. but all the records comming as null. Kindly help me to resolve this issue.

  • Help - error in reading frame from file

    Hi there
    Couldn't find any reference to this particular problem after searching around a whole load.
    I had my Mac crash on me a few days ago and since then I've been only able to work on my current project for ten minutes at a time before I get the above dialogue come up.
    It's not just this file that suffers from this and there doesn't appear to be a pattern to which file is affected. The files that are mentioned in the dialogue are outputs from both FCP and from AE itself, they are always Quicktimes and they are compressed with the Animation codec, although I've used a number of other codecs and it doesn't seem to make any difference. If I quit and restart AE, I can continue working for a while on a composition with the same file that caused the dialogue to appear, until it happens again, often with a different file mentioned in the dialogue.
    We have re-installed the CC suite after an uninstall and clean-up, but to no avail.
    Anyone else had this problem?
    Do we need to reinstall the OS? Could it be a quicktime thing?
    Many thanks for you help in advance.

    See this thread, on which one of my colleagues is helping folks troubleshoot some related issues:
    http://forums.adobe.com/message/5549272

  • URGENT HELP NEEDED. IS "JE_LINE_NUM" FROM GL_INTERFACE USED in 11.03 or 11i?

    Please help!
    I need to make an import from a custom Payroll application into GL. Everything would be working just fine, if I could use the JE_LINE_NUM from GL_INTERFACE table. In the tech documentation it was stated that this column is not used in version 10. Nothing stated about 11.03 or 11i
    If this doesn't work, any ideea how could I manage the journal detail line number the transaction is imported?
    THANK YOU VERY MUCH.
    Please answer at: [email protected]

    If I interpreted your requirements correctly, you wish to supply the JE_LINE_NUM in the GL_INTERFACE table.
    Unfortunately, you cannot do so. The GL_INTERFACE.JE_LINE_NUM column must be NULL for Journal Import to function correctly. This is mentioned in the User's Guide. Since the grouping of lines into batches and headers is done dynamically by journal import, it is not possible to support a user-specified journal line number. This will cause duplicates or gaps.
    This is true for all GL releases.

  • Urgent Help Needed in scheduling reports from BI Publisher

    Hi,
    I have configure the scheduler service on my windows server. Now i am trying to schedule a report from BI pubisher. But it is not working. When i click submit button, It is not doing anything. It seems it adds entry in the job schedule table. Even when i click schedules link, it shows just show progress status on explorer status bar but nothing happens.
    Any help would be on this would be highly appretiated.
    Thanks,
    Prasad

    Have you actually checked the scheduler tab to see what the report did? BI Publisher will not just tell you if a job fails unless you have your email server configured then you tell it to email you if the job fails. Also, be patient because it can take up to 5 or 10 minutes for a report to completely run for a 40000 row dataset. If you check the scheduler tab and the job failed, check your RTF Template. I have discovered through trial and error that BIP is picky about how you do your tags, especially loop tags. These would allow you to view the report online but cause BIP scheduled reports to fail on the report. Other than that, have you installed the scheduler database and tied it in? BIP has its own database schema you have to install somewhere on an database server that it stores scheduling information in.
    I hope this helps.

  • Help Needed, problem reading a configuration file in XML form

    Hello,
    I am using NetBeans 6.5.1 with Apache Tomcat 6.0.18.
    I am trying to develop a web application and in my source files I have a thread that loops every second and reads the contents of a configuration file which is in XML form using java.util.Properties.
    As soon as I call props.loadFromXML(new FileInputStream(file)); I get several exceptions that I don't know what they mean nor I know how to resolve them.
    I would apreciate any help you guys can provide.
    Here is what I get in NetBeans:_
    Apr 30, 2009 8:56:53 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy
    INFO: WSSERVLET15: JAX-WS servlet destroyed
    Apr 30, 2009 8:56:53 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
    INFO: WSSERVLET13: JAX-WS context listener destroyed
    Apr 30, 2009 8:56:53 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
    INFO: Illegal access: this web application instance has been stopped already. Could not load META-INF/services/javax.xml.parsers.DocumentBuilderFactory. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    Apr 30, 2009 8:56:53 PM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:111)
    at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:75)
    at java.util.XMLUtils.load(XMLUtils.java:57)
    at java.util.Properties.loadFromXML(Properties.java:852)
    And following the above I get:_
    Apr 30, 2009 8:56:53 PM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:111)
    at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:75)
    at java.util.XMLUtils.load(XMLUtils.java:57)
    at java.util.Properties.loadFromXML(Properties.java:852)
    Thanks in advanced.

    kimskams wrote:
    Very Sorry Problem Remains... I checked Scanner on a Smaller file (to give u fast feedback) but I think the spaces in Small file were normal.. that is why it worked..
    In fact I can feel some word on the blank line (hidden words).. its cursor who evidence their presence so Its not working..
    Its a big program which is accessing a lexical resource so I think what I copied was Ok..
    If u still have some solutions then please tell me otherwise I have to remove these blank lines manually for the time being but its not solution.
    I m trying alsoI don't think anyone can give you an answer: people here don't know how your file looks like. Obviously those lines (when the Scanner instance stops reading) are not just empty lines.

  • I need urgent help to remove unwanted adware from my iMac. Help!

    I need urgent help to remove unwanted adware from my iMac. I have somehow got green underline in text ads, pop up ads that come in from the sides of the screen and ads that pop up selling similar products all over the page wherever I go. Its getting worse and I have researched and researched to no avail. I am really hestitant to download any software to remove whatever it is that is causing this problem. I have removed and reinstalled chrome. I have cleared Chrome and Safari cookies. Checked extensions, there are none to remove. I need to find an answer on how to get rid of these ads. Help please!

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/Application Support/VSearch
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchAgents/com.vsearch.agent.plist
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    Restart and empty the Trash. Don't try to empty the Trash until you have restarted.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. It must be said that this failure of oversight is inexcusable and has seriously compromised the value of Gatekeeper and the Developer ID program. You cannot rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Urgent help needed, can I restore N900 Backup file...

    i owned a N900 (now sold out)
    before selling i took backup of contacts from backup restore option in application section
    now i bought a N8 but i m not able to restore my contacts
    1. is there any way to restore them in N8?
    2. if not, can i convert them in TEXT or any readable format
    urgent help needed
    thanks in advance

    The backup procedures built into the phone are only designed for restoring to the same phone (ie: in case or data corruption, software update or repair etc.), they can't usually be used to restore to a phone with a different operating system.
    You should have backed up with Ovi Suite before selling the N900, that would have been able to restore to the N8.

  • Need to read data from pipe separated file using POJO?

    Hi,
    I need to read data from pipe separated file using POJO.
    There is config.properties file which consists of the
    data mapping.
    Can you help me with sample code or help?
    Regards
    Regards
    Taton
    Edited by: Taton on Mar 7, 2009 4:41 PM

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need urgent help in listing out checklist from DBA prespective for BI Implementation Project

    Hello Guys,
    We are in Designing phase Data Modeling of PDW/APS Implementation Project.
    I need urgent help in making a checklist from a DBA perspective.
    Like what are things ill be needing at a time of implementation/Deployment.
    Your expert comments and help will be highly appreciated.
    Thank you,
    Anish.S
    Asandeen

    You can get good summary of checklist from this article about
    DBA checklist for data warehousing.
    Which highlights on below pointers:
    New system or old. (I.e. Up-gradation vs starting from scratch)
    Complexity of SQL Server architecture 
    SQL Server storage
    Determining SQL Server processing power
    SQL Server installation consideration 
    SQL Server configuration parameter
    SQL Server security
    SQL Server Database property
    SQL Server jobs and automation
    Protecting SQL Server data
    SQL Server health monitoring and check ups
    SQL Server ownership and control 
    based on my real time experience, I will suggest you to keep an eye on 
    Load performance (It will be useful when your database(Warehouse) will have huge amount of data)
    System availability (Check for Windows update and up time configuration) 
    Deployment methodology should be planned in advance. Development of packages and respective objects should be done systematically.
    Source control mechanism 
    Disk space and memory usage
    You might or might not have full rights on production environment, so be prepared to analyze production environment via Select statements [I guess you got my point]
    Proper implementation of Landing , Staging and Mart tables.
    Column size (this can drastically decrease your database size)
    Usage of indexes (Index are good, but at what cost?)
    I hope this will assist you in building your check list.

  • Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Thanks for prompt reply, yes we have tried that but have now closed down the browser we where the photos were.
    We haven't sent up time machine, do you know whether there is any roll-back function on a Mac?
    Thanks

  • Need to read data from a text file

    I need to read data from a text file and create my own hash table out of it. I'm not allowed to use the built in Java class, so how would I go implementing my own reading method and hash table class?

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Putting Authorization Check in MM03 Material Dimension

    Hi Experts, I want to put a authorization check to stop unauthorized users from getting specific material details (or even looking at specific materials) via MM03. I've put break points at all the 3 enhancement points (MGA00001, MGA00002, MGA00003) a

  • Strange PDF files printing inverted colors!?

    I help support an office with several macs. Two of my remote office computers have an odd problem. In Apple Preview PDF files print inverted colors. If I open the PDF in Adobe reader they print normal. They are both trying to print to Samsung ML320 p

  • IPhone 4 stopped working

    Hi my iPhone 4 stopped working randomly even though it still had power. I've tried charging it but that hasn't worked neither has holding down the power and home button any tips?

  • Toshiba Qosmio DX730 All In One - mouse eratic

    My mouse seems to have a mind of it's own and I find it very hard to control. It jumps all over the place.

  • NO SOUND WHEN TOUCHING CLICKWHEEL, CRACKLY SOUND WHEN RUBBING FACEPLATE

    Hello, I have a 30Gb iPod video and the sound isn't working. If I turn it on and play a song, I get no sound. The screen shows the song and if I adjust the volume via the clickwheel, the volume bar moves up or down but still no sound. *However, if I