Help needed with domparsers for accessing TextNode value

Hi,
My input appears like this.
<header>
<Data>bhargav</Data>
<header>
i need to write a java mapping code where i need to access the value of <Data>.It is a type String and Category is element.In my java code i need to take this content of <Data> into a String.
Thanks in advance,
Bhargav
Message was edited by:
        bhargav gundabolu

Hi,
Im using this java mapping to solve the level-2 hierarchical issue that occures with content conversion.I have written my java mapping using domparsers and StreamTransformation. and the output is coming fine.But in one case i need to access the value of the <Data> node and make some changes to it.But im unable to do it as <Data> here is a text node.
Thanks,
Bhargav

Similar Messages

  • Help needed with swings for socket Programming

    Im working on a Project for my MScIT on Distributed Computing...which involves socket programming(UDP)....im working on some algorithms like Token Ring, Message Passing interface, Byzantine, Clock Syncronisation...i hav almost finished working on these algorithms...but now i wanna give a good look to my programs..using swings but im very new to swings...so can anyone help me with some examples involving swings with socket programming...any reference...any help would be appreciated...please help im running out of time..
    thanking u in advance
    anDy

    hi im Anand(AnDY),
    i hav lost my AnDY account..plz reply to this topic keeping me in mind :p

  • Help needed with 'Conditions' for field with read only on demand

    Hy guys,
    I really need your help now, i have two items named P22_LOGIN_TYPE (..wich can be 'Default' or 'Special') and P22_PASSWORD, i need to turn to 'read only' the second item when the first item is 'Default', i'v tryied the conditional option but with no success, i know is managed from there but it's not working for me, it seems that i don't know exactly how to do it. By the way, i have APEX 2.2.
    I need an exact guide (explanation) on how to do it, thank you very much.
    Best regards,
    Victor

    Firstly you could set your First item to be a select list with submit. Make the branch go to the same page.
    Secondly, on the read-only conditions for your second item, use the condition when item in expression 1 = value in expression 2, and set that to 'Default' in expression 2.
    Essentially this will re-submit your page when you make a selection either 'Default' or 'Special'. If 'Default' is selected, then the PASSWORD item will be rendered as read-only. If you don't want to display the PASSWORD item at all, you can put the above condition for the read-only, into the conditions section of the item.
    Hope this helps and is not too confusing. It reads a lot worse than it actually is ;)
    Cj

  • Help needed with certificates for RDS Host servers

    Hi,
    We currently have 4 RD Session-Host servers in our network. All four servers are member of a TS farm. We also have a TS Gatway server.
    I managed to give the TSGW server a certificate but I need your support on this on the RDS servers.
    What happens?
    When a user connects to the farm, a warning pops up telling me that the certificate is not issued by a trusted CA. This is because all RDS servers are using self signed certificates. Because the servers are farm members a user can be presented with this
    warning several times when the session is being redirected.
    How do I get rid of these warnings as well in our LAN as on the internet? What certificate type do I need?
    Thanks in advance.
    Jasper Kimmel

    Hi Jasper,
    What is your Server OS for your environment?
    Yeah, your all certificate related all warnings can disappear by purchasing the certificate from public CA. To access the farm outside the environment you can buy wildcard certificate. And yes, your all related queries be solved from the article provide in
    my previous comment.
    The easiest way to get a certificate, if you control the client machines that will be connecting, is to use Active Directory Certificate Services.  You can request and deploy your own certificates and they will be trusted by every machine in the domain.
    If you're going to allow users to connect externally and they will not be part of your domain, you would need to deploy certificates from a public CA.  Examples including, but not limited to: GoDaddy, Verisign, Entrust, Thawte, DigiCert
    In Windows 2008/2008 R2, you connect to the farm name, which as per DNS round robin, gets first directed to the redirector, next to the connection broker and finally to the server that will host your session.
    In Windows 2012, you connect to the Connection Broker and it routes you to the collection by using the collection name.  
    The certificates you deploy need to have a subject name or subject alternate name that matches the name of the server that the user is connecting to.  So for example, for Publishing, the certificate needs to contain the names of all of the RDSH servers
    in the collection.  The certificate for RDWeb needs to contain the FQDN of the URL, based on the name the users connect to.  If you have users connecting externally, this needs to be an external name (needs to match what they connect to).  If
    you have users connecting internally to RDweb, the name needs to match the internal name.  For Single Sign On, again the subject name needs to match the servers in the collection. (Quoted from previous article).
    Apart there is one more article by Kristin, you can go through for reference.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].

  • Help Needed with JavaScript for show/hide subforms controlled by dropdown selection... Please!

    I have created a form that depending on what is seleced in a drop down menu it should determine what subform is displayed. The code I am pasting below only works with one (4 total) of the selections in the dropdown.
    I am not a scriptor by any strectch of the imagination! Can anyone see what I need to fix in the below to get this to work. It is almost like I am missing some sort of "or" statement... Any suggestions?
    Here is the current javascript associated with the dropdown field:
    form1.jobselection.customjob::change - (JavaScript, client)
    customprint.presence = "hidden";
    frontpagenote.presence = "hidden";
    weprint.presence = "hidden";
    preprint.presence = "hidden";
    if (xfa.event.newText == "CustomPrint"){customprint.presence = "visible";}
    else {frontpagenote.presence = "hidden";
    weprint.presence = "hidden";
    preprint.presence = "hidden";}
    if (xfa.event.newText == "PrePrint"){preprint.presence = "visible";}
    else {frontpagenote.presence = "hidden";
    weprint.presence = "hidden";
    customprint.presence = "hidden";}
    if (xfa.event.newText == "FrontPageNote"){frontpagenote.presence = "visible";}
    else {preprint.presence = "hidden";
    weprint.presence = "hidden";
    customprint.presence = "hidden";}
    if (xfa.event.newText == "WePrint"){weprint.presence = "visible";}
    else {frontpagenote.presence = "hidden";
    preprint.presence = "hidden";
    customprint.presence = "hidden";}
    form1.jobselection.customjob::click - (JavaScript, client)
    if (customjob.rawValue == CustomPrint)
    xfa.resolveNode(form1.jobselection.customprint).presence="visible";
    else
    xfa.resolveNode(form1.jobselection.customprint).presence="hidden";

    First of all i suggest you clean up the code a bit. Use this for example.
    var strSelectedText = xfa.event.newText;
    customprint.presence      = (strSelectedText == "CustomPrint") ? "visible" : "hidden";
    preprint.presence            = (strSelectedText == "PrePrint") ? "visible" : "hidden";
    frontpagenote.presence   = (strSelectedText == "FrontPageNote") ? "visible" : "hidden";
    weprint.presence            = (strSelectedText == "WePrint") ? "visible" : "hidden";
    //Optional code for checking values. You might want to put this in the exit-event.
    console.show();
    console.println("value = " + strSelectedText );
    console.println("customprint.presence = " +customprint.presence );
    console.println("preprint.presence = " + preprint.presence );
    console.println("frontpagenote.presence  = " + frontpagenote.presence  );
    console.println("weprint.presence = " + weprint.presence );
    // End optional code.
    What the above does is just have the same if/else you use, it just does it in much less code/scripting.
    The optional code is for you to verify what actually goes on. Wich values are changed or given, etc.
    What also might help is to write down the full path off the subform you want to change the presence of.
    So instead of "frontpage.presence" you write down "form1.frontpage.presence".
    Hope this helps.
    Rien.

  • Help needed with DisplayConfigX for Philips 32PW9551/12 CRT TV

    Hi everyone,
    I've been following this part of Apple Discussions closely for some time now, and I realise that I'm not the only one having trouble connecting my Mac Mini (Core Duo) to my TV. I'm hoping that BSteely or somebody else here could take a look at my specific problem. I'll try to provide as much relevant info as I can, if more input is needed, please specify.
    Here goes :
    TV model : Philips 32PW9551/12 That's a CRT, but with HDMI input. The manual says that it should accept 480p, 576p, 720p and 1080i.
    Cable : DVI-HDMI
    Using VNC over Airport when things go wrong, resetting back to the original resolutions.
    Problem : can't get 720p resolution to work, only 640x480 fills screen. 640x480 is too low, since Remote Buddy's menu does not even fit on it.
    When I select 1280x720 the image is on the left of the TV, leaving a wide black bar on the right and dropping a lot on the right. Other resolutions either don't work at all, are seriously overscanned (no dock, no menu) or are horrible to look at.
    I've been fiddling with DisplayConfigX and SwitchResX, but I feel it's out of my league, so I'm not getting anywhere. I did export settings via SwitchResX, I hope that provides some insights.
    Thank you very much in advance for helping me get my setup to work by creating a tailormade timing !
    Kind regards,
    Also Starring
    Belgium
    DDC block report generated by SwitchResX for display
    PhilipsTV
    0 1 2 3 4 5 6 7 8 9 A B C D E F
    0 | 00 FF FF FF FF FF FF 00 41 0C 51 95 01 01 01 01
    1 | 06 10 01 03 80 42 25 78 0A 0D C9 A0 57 47 98 27
    2 | 12 48 4C 20 00 00 01 01 01 01 01 01 01 01 01 01
    3 | 01 01 01 01 01 01 01 1D 80 D0 72 1C 16 20 10 2C
    4 | 25 80 94 72 21 00 00 9E 01 1D 00 72 51 D0 1E 20
    5 | 6E 28 55 00 94 72 21 00 00 1E 00 00 00 FD 00 31
    6 | 3D 1C 2E 08 00 0A 20 20 20 20 20 20 00 00 00 FC
    7 | 00 4C 30 36 48 44 20 76 31 20 31 36 3A 39 01 29
    Valid DDC block: checksum passed
    EDID Version........1.3
    Manufacturer........PHL
    Product Code........20885 (5195) (9551)
    Serial Number.......16843009
    Manufactured........Week 6 of year 2006
    Max H Size..........66 cm
    Max V Size..........37 cm
    Gamma...............2.20
    DPMS Supported Features:
    Display type:
    RGB color display
    Input signal & sync:
    Digital
    Color info:
    Red x = 0.625 Green x = 0.280 Blue x = 0.155 White x = 0.283
    Red y = 0.340 Green y = 0.595 Blue y = 0.070 White y = 0.298
    Established Timings:
    640 x 480 @ 60Hz
    Manufacturer Reserved Timings:
    Standard Timing Identification:
    Monitor Description blocks:
    Descriptor #0 is Timing definition:
    Mode = 1920 x 540 @ 50Hz
    H. Active...............1920 pixels
    H. Blanking.............720 pixels
    V. Active...............540 lines
    V. Blanking.............22 lines
    HSync Offset............528 pixels
    HSync Pulse Width.......44 pixels
    VSync Offset............2 lines
    VSync Pulse Width.......5 lines
    Pixel Clock.............74.25MHz
    Horizontal freq.........28.12kHz
    Vertical freq...........50.04Hz
    H Image Size............660mm
    V Image Size............370mm
    H Border................0 pixels
    V Border................0 lines
    Interlaced
    Sync: Digital separate with
    * Positive vertical polarity
    * Positive horizontal polarity
    Descriptor #1 is Timing definition:
    Mode = 1280 x 720 @ 60Hz
    H. Active...............1280 pixels
    H. Blanking.............370 pixels
    V. Active...............720 lines
    V. Blanking.............30 lines
    HSync Offset............110 pixels
    HSync Pulse Width.......40 pixels
    VSync Offset............5 lines
    VSync Pulse Width.......5 lines
    Pixel Clock.............74.25MHz
    Horizontal freq.........45.00kHz
    Vertical freq...........60.00Hz
    H Image Size............660mm
    V Image Size............370mm
    H Border................0 pixels
    V Border................0 lines
    Non-Interlaced
    Sync: Digital separate with
    * Positive vertical polarity
    * Positive horizontal polarity
    Descriptor #2 is Monitor limits:
    Horizontal frequency range.......28-46 kHz
    Vertical frequency range.........49-61 Hz
    Maximum bandwidth unspecified
    Descriptor #3 is Monitor name:
    L06HD v1 16:9
    Mini Intel Core Duo   Mac OS X (10.4.8)  

    (1280x594 60Hz NTSC) gives fairly stable
    image, big black border on
    top, fallen off image on the left but right and
    bottom seem ok.
    You might want to run with that and see if you can dial it in better. SwitchRes X has arrows you can use in the right-hand side of the custom pane where you can try and center and size the image better.
    Another thing. I don't seem to be able to enter the
    pixel clock number exactly as you specify. It keeps
    changing it slightly. Eg, after rebooting, it says
    68,4 in SRX, even though I entered 69,75 before...
    This is explained in the SRX documentation. When you make a request of the hardware that it somehow can't satisfy, it just tries to do the next closest thing. But you don't get and feedback of what the hardware can and cannot do. You only get unexpected results as you have mentioned.
    And also, should the vertical scan rate not be
    exactly 60 Hz ? Other numbers don't seem to be
    accepted by the TV, but when making custom timings,
    these scan rate numbers seem to be changing all the
    time.
    If you look at the EDID data you posted at the begining of this thread, towards the bottom it states that your TV will work from with any vertical frequency in the range of 49Hz to 61Hz. You don't need to use 60Hz but that is a standard. There is very little downside to deviating from that with and LCD display.

  • Help needed with connectors for Netbeans and Forte

    Im using Forte for Java
    my biggest obstacle is connecting sub j-frames to the main j-frame
    i have created a main J-frame and sub j-frames in one package
    in the Main J-frame there are buttons that you click to go to the next frame the same way "a-href" in HTML works in the same window and back
    what my problem is how to declare the connectors for each button to go to the sub-frame
    what code generators are required and the process and how to lable each sub-frame to be called
    my project is a finance program
    i.e
    Main Frame
    Menu:- ( TVM) ----------> button
    (simple interest)-------> button
    etc
    when you click the (TVM) button
    it should open the TVM frame (subframe in the same window)
    this is my problem your help please this is a project which i have a deadline to meet ive done research through out but couldn't come across any useful or relevent material
    this is a lot easier with pascal but Forte is a compulsory and java
    if you want the screenshots ill post it thru mail just drop your adress and ill forward it
    thank you

    matt010385 wrote:
    Thanks
    I have already tried all of the things that site suggests, there is nothing wrong with the servers, or the service, I have tried all the work arounds that they suggest, but I still cannot get it to work.
    Having a quick read i see from a link there that you might need to open ports(port forwarding).
    Are you using a HH3, if so, I believe that it does have trouble with port forwarding, you can try a search here.
    I am not into games as such, so will have to leave it for others to possibly help with some info.
    toekneem
    http://www.no2nuisancecalls.net
    (EASBF)

  • Help Needed with Itemlsteners for Choice in AWT

    Hi,
    I am new to AWT prgramming .
    I have created a menu called " Menu System Test window " and it contains toplevel menu item "File" and File Menu contains subitems "Product Evaluation" and "Exit".
    When i click File->Product Evaluation it displays a new Frame named "ProductEvaluationMeasurementTool" with some check boxes ,radiobuttons, buttons , text fields and choice lists.
    The two Choices ie c1 and c2 contains items choice,choice2 and scale 1 and scale 2 respectively and i have added ItemListeners for both the choices.
    My question is when i select Both choice1 and scale 1 it shoulddisplay a new frame.
    (NOTE : THE NEW FRAME SHOULD BE DISPLAYED IF I SELECT BOTH CHOICE1 AND SCALE1 NOT EITHER CHOICE1 OR SCALE1)
    Similarly when i select Both choice2 and scale2 it should display another new frame. How can i do that? i am sending my code.
    Thanks in advance
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Component;
    import java.awt.Checkbox;
    import javax.swing.*;
    // Make a main window with a top-level menu: File 
    public class MainWindow extends Frame {
      public MainWindow() {
        super("Menu System Test Window");
        setSize(500, 500);
        // make a top level File menu
        FileMenu fileMenu = new FileMenu(this);
        // make a menu bar for this frame 
        // and add top level menus File and Menu
        MenuBar mb = new MenuBar();
        mb.add(fileMenu);
        setMenuBar(mb);
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            exit();
      public void exit() {
        setVisible(false); // hide the Frame
        dispose(); // tell windowing system to free resources
        System.exit(0); // exit
      public static void main(String args[]) {
        MainWindow w = new MainWindow();
        w.setVisible(true);
    // Encapsulate the look and behavior of the File menu
    class FileMenu extends Menu implements ActionListener {
        private MainWindow mw; // who owns us?
      private MenuItem itmPE   = new MenuItem("ProductEvaluation");
      private MenuItem itmExit = new MenuItem("Exit");
      public FileMenu(MainWindow main)
        super("File");
        this.mw = main;
        this.itmPE.addActionListener(this);
        this.itmExit.addActionListener(this);
        this.add(this.itmPE);
        this.add(this.itmExit);
      // respond to the Exit menu choice
      public void actionPerformed(ActionEvent e)
        if (e.getSource() == this.itmPE)
         Frame f = new Frame("ProductMeasurementEvaluationTool");
         f.setSize(1290,1290);
         f.setLayout(null);
         TextField t1 = new TextField("textField1");
         t1.setBounds(230, 630, 50, 24);
         f.add(t1);
         TextField t2 = new TextField("textField2");
         t2.setBounds(430, 630, 50, 24);
         f.add(t2);
         Choice c1 = new Choice();
         c1.addItem("Choice1");
         c1.addItem("Choice2");
         c1.addItemListener(new MyItemListener());
         f.add(c1);
         c1.setBounds(630, 600, 120, 24);
         Choice c2 = new Choice();
         c2.addItem("scale1");
         c2.addItem("scale2");
         c2.addItemListener(new MyItemListener());
         f.add(c2);
         c2.setBounds(840, 600, 120, 24);
         Label l1 = new Label("Select the appropriate metrics for Measurement Process Evaluation");
         l1.setBounds(380, 50, 380, 20);
         f.add(l1);
         Label l2 = new Label("Architecture Metrics");
         l2.setBounds(170, 100, 110, 20);
         f.add(l2);
         Label l3 = new Label("RunTime Metrics");
         l3.setBounds(500, 100, 110, 20);
         f.add(l3);
         Label l4 = new Label("Documentation Metrics");
         l4.setBounds(840, 100, 130, 20);
         f.add(l4);
         JRadioButton rb1 = new JRadioButton("Componenent Metrics",false);
         rb1.setBounds(190, 140, 133, 20);
         f.add(rb1);
         JRadioButton rb2 = new JRadioButton("Task Metrics",false);
         rb2.setBounds(540, 140, 95, 20);
         f.add(rb2);
         JRadioButton rb3 = new JRadioButton("Manual Metrics",false);
         rb3.setBounds(870, 140, 108, 20);
         f.add(rb3);
         JRadioButton rb4 = new JRadioButton("Configuration Metrics",false);
         rb4.setBounds(190, 270, 142, 20);
         f.add(rb4);
         JRadioButton rb6 = new JRadioButton("DataHandling Metrics",false);
         rb6.setBounds(540, 270, 142, 20);
         f.add(rb6);
         JRadioButton rb8 = new JRadioButton("Development Metrics",false);
         rb8.setBounds(870, 270, 141, 20);
         f.add(rb8);
         Checkbox  c10 = new Checkbox("Size");
         c10.setBounds(220, 170, 49, 20);
         f.add(c10);
         Checkbox c11 = new Checkbox("Structure");
         c11.setBounds(220, 190, 75, 20);
         f.add(c11);
         Checkbox c12 = new Checkbox("Complexity");
         c12.setBounds(220, 210, 86, 20);
         f.add(c12);
         Checkbox c13 = new Checkbox("Size");
         c13.setBounds(220, 300, 49, 20);
         f.add(c13);
         Checkbox c14 = new Checkbox("Structure");
         c14.setBounds(220, 320, 75, 20);
         f.add(c14);
         Checkbox c15 = new Checkbox("Complexity");
         c15.setBounds(220, 340, 86, 20);
         f.add(c15);
         Checkbox c19 = new Checkbox("Size");
         c19.setBounds(580, 170, 49, 20);
         f.add(c19);
         Checkbox c20 = new Checkbox("Structure");
         c20.setBounds(580, 190, 75, 20);
         f.add(c20);
         Checkbox c21 = new Checkbox("Complexity");
         c21.setBounds(580, 210, 86, 20);
         f.add(c21);
         Checkbox c22 = new Checkbox("Size");
         c22.setBounds(580, 300, 49, 20);
         f.add(c22);
         Checkbox c23 = new Checkbox("Structure");
         c23.setBounds(580, 320, 75, 20);
         f.add(c23);
         Checkbox c24 = new Checkbox("Complexity");
         c24.setBounds(580, 340, 86, 20);
         f.add(c24);
         Checkbox c28 = new Checkbox("Size");
         c28.setBounds(920, 170, 49, 20);
         f.add(c28);
         Checkbox c29 = new Checkbox("Structure");
         c29.setBounds(920, 190, 75, 20);
         f.add(c29);
         Checkbox c30 = new Checkbox("Complexity");
         c30.setBounds(920, 210, 86, 20);
         f.add(c30);
         Checkbox c31 = new Checkbox("Size");
         c31.setBounds(920, 300, 49, 20);
         f.add(c31);
         Checkbox c32 = new Checkbox("Structure");
         c32.setBounds(920, 320, 75, 20);
         f.add(c32);
         Checkbox c33 = new Checkbox("Complexity");
         c33.setBounds(920, 340, 86, 20);
         f.add(c33);
         ActionListener action = new MyActionListener(f, t1, t2);
         Button b1  = new Button("Button1");
         b1.setBounds(230, 600, 120, 24);
         b1.addActionListener(action);
         f.add(b1);
         Button b2  = new Button("Button2");
         b2.setBounds(430, 600, 120, 24);
         b2.addActionListener(action);
         f.add(b2);
               f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e)
              System.exit(0);
         f.show();
        else
       { mw.exit();}
    class MyActionListener implements ActionListener
      private Frame     frame;
      private TextField textField1;
      private TextField textField2;
      public MyActionListener(Frame frame, TextField tf1, TextField tf2)
        this.frame = frame;
        this.textField1 = tf1;
        this.textField2 = tf2;
      public void actionPerformed(ActionEvent e)
        String s = e.getActionCommand();
        if (s.equals("Button1"))
            Component[] components = this.frame.getComponents();
      int numOfCheckBoxes = 81;
      int numChecked = 0;
      for (int i = 0; i < components.length; i++)
            if (components[i] instanceof Checkbox)
              if (((Checkbox)components).getState())
    numChecked++;
    double ratio = (double) numChecked / (double) numOfCheckBoxes;
    this.textField1.setText(Double.toString(ratio));
    else
    if (s.equals("Button2"))
    Component[] components = this.frame.getComponents();
    int numOfCheckBoxes = 81;
    int numChecked = 0;
    for (int i = 0; i < components.length; i++)
    if (components[i] instanceof Checkbox)
    if (((Checkbox)components[i]).getState())
    numChecked++;
    double ratio = (double) numChecked / (double) numOfCheckBoxes;
    this.textField2.setText(Double.toString(ratio));
    class MyItemListener implements ItemListener {
         public void itemStateChanged(ItemEvent e) {
                   String command = (String) e.getItem();

    The easy answer is that you need to add state to one of your classes. What does this mean? Somewhere you will have to keep track of which items are selected in each Choice. There are a lot of ways to do this. One way is to pass a reference for each Choice, ie, c1 and c2, in to the constructor of MyItemListener and for each ItemEvent.SELECTED type of event:
    1 - check the selected item of each Choice and see if they have the same ending number, or are the same index in an array kept in your MyItemListener class or ... many ways;
    2 - decide what to do depending on what you find after checking.
    Since you have a separate class for the ItemListener this might be a good place to keep track of the selection status of the two Choice components. The member variables you use to keep track of things is the state.
    Another thing to consider is whether to add a separate listener to each Choice or to create a single instance and add it to each component. If you add a separate one then the Choice selections won't know about each other - each separate listener receives events from only one of the components. If you use a single instance for both components then you can get selection information from each of the Choice components. This way you can track things, or keep state, inside the class.
    I abbreviated the class name so you can run this without name-clashing in your computer.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Component;
    import java.awt.Checkbox;
    import javax.swing.*;
    public class MW extends Frame {
        public MW() {
            super("Menu System Test Window");
            setSize(500, 500);
            // make a top level File menu
            FileMenu fileMenu = new FileMenu(this);
            // make a menu bar for this frame 
            // and add top level menus File and Menu
            MenuBar mb = new MenuBar();
            mb.add(fileMenu);
            setMenuBar(mb);
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    exit();
        public void exit() {
            setVisible(false); // hide the Frame
            dispose();         // tell windowing system to free resources
            System.exit(0);    // exit
        public static void main(String args[]) {
            MW w = new MW();
            w.setVisible(true);
    // Encapsulate the look and behavior of the File menu
    class FileMenu extends Menu implements ActionListener {
        private MW mw; // who owns us?
        private MenuItem itmPE   = new MenuItem("ProductEvaluation");
        private MenuItem itmExit = new MenuItem("Exit");
        public FileMenu(MW main) {
            super("File");
            this.mw = main;
            this.itmPE.addActionListener(this);
            this.itmExit.addActionListener(this);
            this.add(this.itmPE);
            this.add(this.itmExit);
        // respond to the Exit menu choice
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == this.itmPE) {
                final Frame f = new Frame("ProductMeasurementEvaluationTool");
                f.setSize(1290,1290);
                f.setLayout(null);
                MyItemListener itemListener = new MyItemListener(mw);
                TextField t1 = new TextField("textField1");
                t1.setBounds(230, 630, 50, 24);
                f.add(t1);
                TextField t2 = new TextField("textField2");
                t2.setBounds(430, 630, 50, 24);
                f.add(t2);
                Choice c1 = new Choice();
                c1.addItem("Choice1");
                c1.addItem("Choice2");
                c1.addItemListener(itemListener);
                f.add(c1);
                c1.setBounds(630, 600, 120, 24);
                Choice c2 = new Choice();
                c2.addItem("scale1");
                c2.addItem("scale2");
                c2.addItemListener(itemListener);
                f.add(c2);
                c2.setBounds(840, 600, 120, 24);
                Label l1 = new Label("Select the appropriate metrics for " +
                                     "Measurement Process Evaluation");
                l1.setBounds(380, 50, 380, 20);
                f.add(l1);
                Label l2 = new Label("Architecture Metrics");
                l2.setBounds(170, 100, 110, 20);
                f.add(l2);
                Label l3 = new Label("RunTime Metrics");
                l3.setBounds(500, 100, 110, 20);
                f.add(l3);
                Label l4 = new Label("Documentation Metrics");
                l4.setBounds(840, 100, 130, 20);
                f.add(l4);
                JRadioButton rb1 = new JRadioButton("Componenent Metrics",false);
                rb1.setBounds(190, 140, 133, 20);
                f.add(rb1);
                JRadioButton rb2 = new JRadioButton("Task Metrics",false);
                rb2.setBounds(540, 140, 95, 20);
                f.add(rb2);
                JRadioButton rb3 = new JRadioButton("Manual Metrics",false);
                rb3.setBounds(870, 140, 108, 20);
                f.add(rb3);
                JRadioButton rb4 = new JRadioButton("Configuration Metrics",false);
                rb4.setBounds(190, 270, 142, 20);
                f.add(rb4);
                JRadioButton rb6 = new JRadioButton("DataHandling Metrics",false);
                rb6.setBounds(540, 270, 142, 20);
                f.add(rb6);
                JRadioButton rb8 = new JRadioButton("Development Metrics",false);
                rb8.setBounds(870, 270, 141, 20);
                f.add(rb8);
                Checkbox  c10 = new Checkbox("Size");
                c10.setBounds(220, 170, 49, 20);
                f.add(c10);
                Checkbox c11 = new Checkbox("Structure");
                c11.setBounds(220, 190, 75, 20);
                f.add(c11);
                Checkbox c12 = new Checkbox("Complexity");
                c12.setBounds(220, 210, 86, 20);
                f.add(c12);
                Checkbox c13 = new Checkbox("Size");
                c13.setBounds(220, 300, 49, 20);
                f.add(c13);
                Checkbox c14 = new Checkbox("Structure");
                c14.setBounds(220, 320, 75, 20);
                f.add(c14);
                Checkbox c15 = new Checkbox("Complexity");
                c15.setBounds(220, 340, 86, 20);
                f.add(c15);
                Checkbox c19 = new Checkbox("Size");
                c19.setBounds(580, 170, 49, 20);
                f.add(c19);
                Checkbox c20 = new Checkbox("Structure");
                c20.setBounds(580, 190, 75, 20);
                f.add(c20);
                Checkbox c21 = new Checkbox("Complexity");
                c21.setBounds(580, 210, 86, 20);
                f.add(c21);
                Checkbox c22 = new Checkbox("Size");
                c22.setBounds(580, 300, 49, 20);
                f.add(c22);
                Checkbox c23 = new Checkbox("Structure");
                c23.setBounds(580, 320, 75, 20);
                f.add(c23);
                Checkbox c24 = new Checkbox("Complexity");
                c24.setBounds(580, 340, 86, 20);
                f.add(c24);
                Checkbox c28 = new Checkbox("Size");
                c28.setBounds(920, 170, 49, 20);
                f.add(c28);
                Checkbox c29 = new Checkbox("Structure");
                c29.setBounds(920, 190, 75, 20);
                f.add(c29);
                Checkbox c30 = new Checkbox("Complexity");
                c30.setBounds(920, 210, 86, 20);
                f.add(c30);
                Checkbox c31 = new Checkbox("Size");
                c31.setBounds(920, 300, 49, 20);
                f.add(c31);
                Checkbox c32 = new Checkbox("Structure");
                c32.setBounds(920, 320, 75, 20);
                f.add(c32);
                Checkbox c33 = new Checkbox("Complexity");
                c33.setBounds(920, 340, 86, 20);
                f.add(c33);
                ActionListener action = new MyActionListener(f, t1, t2);
                Button b1  = new Button("Button1");
                b1.setBounds(230, 600, 120, 24);
                b1.addActionListener(action);
                f.add(b1);
                Button b2  = new Button("Button2");
                b2.setBounds(430, 600, 120, 24);
                b2.addActionListener(action);
                f.add(b2);
                f.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        //System.exit(0);
                        f.dispose();
                f.setVisible(true);
            else {
                mw.exit();
    class MyActionListener implements ActionListener { 
        private Frame     frame;
        private TextField textField1;
        private TextField textField2;
        public MyActionListener(Frame frame, TextField tf1, TextField tf2) {
            this.frame = frame;
            this.textField1 = tf1;
            this.textField2 = tf2;
        public void actionPerformed(ActionEvent e) {
            String s = e.getActionCommand();
            if (s.equals("Button1")) {
                Component[] components = this.frame.getComponents();
                int numOfCheckBoxes = 81;
                int numChecked = 0;
                for (int i = 0; i < components.length; i++)
                    if (components[i] instanceof Checkbox)
                        if (((Checkbox)components).getState())
    numChecked++;
    double ratio = (double) numChecked / (double) numOfCheckBoxes;
    this.textField1.setText(Double.toString(ratio));
    else if (s.equals("Button2")) {
    Component[] components = this.frame.getComponents();
    int numOfCheckBoxes = 81;
    int numChecked = 0;
    for (int i = 0; i < components.length; i++)
    if (components[i] instanceof Checkbox)
    if (((Checkbox)components[i]).getState())
    numChecked++;
    double ratio = (double) numChecked / (double) numOfCheckBoxes;
    this.textField2.setText(Double.toString(ratio));
    class MyItemListener implements ItemListener {
    Frame owner;
    Dialog dialog;
    Label label;
    boolean haveScale1, haveScale2, haveChoice1, haveChoice2;
    public MyItemListener(MW mw) {
    owner = (Frame)mw;
    initializeDialog();
    haveScale1 = true;
    haveScale2 = false;
    haveChoice1 = true;
    haveChoice2 = false;
    public void itemStateChanged(ItemEvent e) {
    if(e.getStateChange() == ItemEvent.SELECTED) {
    String command = (String) e.getItem();
    System.out.println("command = " + command);
    if(command.equals("scale1")) {
    haveScale1 = true;
    haveScale2 = false;
    if(command.equals("scale2")) {
    haveScale2 = true;
    haveScale1 = false;
    if(command.equals("Choice1")) {
    haveChoice1 = true;
    haveChoice2 = false;
    if(command.equals("Choice2")) {
    haveChoice2 = true;
    haveChoice1 = false;
    if(haveScale1 && haveChoice1)
    launchDialog(1);
    if(haveScale2 && haveChoice2)
    launchDialog(2);
    private void launchDialog(int n) {
    label.setText("scale" + n + " and Choice" + n + " chosen");
    dialog.setVisible(true);
    private void initializeDialog() {
    label = new Label();
    label.setAlignment(Label.CENTER);
    dialog = new Dialog(owner, "item listener dialog", false);
    dialog.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    dialog.dispose();
    dialog.add(label); // to center of default BorderLayout
    dialog.setSize(200,100);
    dialog.setLocation(300,300);

  • Help Needed with XML Attribute Access (Bold/Italics)

    Hi,
    I have a form that displays data in livecycle designer. When someone imports an xml file into the form in Adobe Acrobat it should be able to display some data as bolded and some italicized based on the xml file.
    Here is the sample xml file
    <Table1>
         <Row1>
              <Cell1 style="none">1</Cell1>
              <Cell2 style="bold">2</Cell2>
              <Cell3 style="italics">3</Cell3>
         </Row1>
    </Table1>
    And the output should be:
    1 2 3 
    Can someone please help! If the xml file should be designed differently please let me know.
    Thank you!

    Paul,
    Thanks for the help! I tried it out and it worked. One last question please. According to your explanation I added to the xml file the tags
    <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.7.0.0" xfa:spec="2.1">
    <p style="font-weight:bold;">2</p>
    </body>
    do I need to place this body tag around each number or can I place it in one location in the xml file?
    Thanks again.

  • Help needed with X11 for Gimp.

    Hi,
    I'm trying to install the open source imaging editing software GIMP (I'm to cheap to pay for photoshop!), and have tried to install X11 as required before installing GIMP but its not working.
    I've tried installing X11 by both downloading it from the Apple site and off the OS X install disk but when I download and try to run GIMP it's telling me I need to install X11 (even though it should be there already).
    After I've installed X11 I've checked to see if it's in the applications utilities folder but I can't see it.
    Can anyone point me in the right direction.
    Thanks,
    Joey.

    I Need help getting MacGimp to run.
    I just purchased MacGimp which is supposedly "The first shrink wrapped GiMP version for OS X". Downloaded, installed but when I launch it, the application starts briefly (icon bobbles in my dock) but then the application quits.
    I am getting NO response from MacGimp or GIMP people even though they have a support request form.
    So I am hoping people here can assist me. I am not proficient to download and compile code. Hence my delight to learn about MacGimp and I was willing to pay for it.
    But it does not run.... I wonder if something is missing?
    Because the MacGimp was supposed to complete and compiled, I have not installed X11 or anyting else.
    Do you think that is the problem.
    Will appreciate assistance. Really want to use GiMP as I don't want to pay hundreds of $ for Photoshop.
    Flat panel 15 iMac and MacBook 2 Gig Intel processor   Mac OS X (10.4.7)   MacBook has 2 Gig RAM, iMac has 1 Gig RAM
    Flat panel 15 iMac and MacBook 2 Gig Intel processor   Mac OS X (10.4.7)   MacBook has 2 Gig RAM, iMac has 1 Gig RAM

  • Help needed with ItemListeners for JCheckboxes

    Hi,
    I have created a menu called "Test" and it contains toplevel menu item "File"
    and File Menu contains subitems "NEw" and "Exit".
    When i click File->NEW it displays a new Frame named f1 which contains 2
    Jradiobuttons(r1 and r2 ) and 6 Jcheckboxes(c1,c2,c3,c4,c5,c6).
    My Question is how can i write itemlisteners for checkboxes such that after compiling the program when i check anyone of the checkboxes c1,c2,c3 or all c1,c2,c3 then RadioButtob r1 should get enabled.
    similarly when i check anyone of the checkboxes c4,c5,c6 or all c4,c5,c6 then RadioButtob r2 should get enabled.
    I am sending the code i have written .
    Kindly help me.
    Thanks in advance.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    // Make a main window with a top-level menu: File
    public class MainWindow extends JFrame {
        public MainWindow() {
            super("Test");
            setSize(500, 500);
            // make a top level File menu
            FileMenu fileMenu = new FileMenu(this);
            // make a menu bar for this frame
            // and add top level menus File and Menu
            JMenuBar mb = new JMenuBar();
            mb.add(fileMenu);
            setJMenuBar(mb);
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    exit();
        public void exit() {
            setVisible(false); // hide the Frame
            dispose(); // tell windowing system to free resources
            System.exit(0); // exit
        public static void main(String args[]) {
            w = new MainWindow();
            w.setVisible(true);
        private static MainWindow w ;
        protected JRadioButton r1, r2;
        protected JCheckBox  c1, c2,c3,c4,c5,c6;
        // Encapsulate the look and behavior of the File menu
        class FileMenu extends JMenu implements ActionListener {
            private MainWindow mw;
            private JMenuItem itmPE   = new JMenuItem("NEW");
            private JMenuItem itmExit = new JMenuItem("Exit");
            public FileMenu(MainWindow main) {
                super("File");
                this.mw = main;
                this.itmPE.addActionListener(this);
                this.itmExit.addActionListener(this);
                this.add(this.itmPE);
                this.add(this.itmExit);
            // respond to the Exit menu choice
            public void actionPerformed(ActionEvent e) {
                if (e.getSource() == this.itmPE) {
                    Frame f1 = new Frame("ProductMeasurementEvaluationTool");
                    f1.setSize(600,400);
                    f1.setLayout(null);
                    r1 = new JRadioButton("Radiobutton1");
                    r1.setBounds( 50, 70, 104, 24);
                    f1.add(r1);
                    r1.setBackground(Color.white);
                    r2 = new JRadioButton("Radiobutton2");
                    r2.setBounds( 280, 70, 104, 24);
                    f1.add(r2);
                    r2.setBackground(Color.white);
                    c1 = new JCheckBox("Checkbox1");
                    c1.setBounds( 80, 100, 93, 24);
                    f1.add(c1);
                    c1.setBackground(Color.white);
                    c2 = new JCheckBox("Checkbox2");
                    c2.setBounds( 80, 120, 93, 24);
                    f1.add(c2);
                    c2.setBackground(Color.white);
                    c3 = new JCheckBox("Checkbox3");
                    c3.setBounds( 80, 140, 93, 24);
                    f1.add(c3);
                    c3.setBackground(Color.white);
                    c4 = new JCheckBox("Checkbox4");
                    c4.setBounds( 320, 100, 93, 24);
                    f1.add(c4);
                    c4.setBackground(Color.white);
                    c5 = new JCheckBox("Checkbox5");
                    c5.setBounds( 320, 120, 93, 24);
                    f1.add(c5);
                    c5.setBackground(Color.white);
                    c6 = new JCheckBox("Checkbox6");
                    c6.setBounds( 320, 140, 93, 24);
                    f1.add(c6);
                    c6.setBackground(Color.white);
                    f1.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                            System.exit(0);
                    f1.setVisible(true);
                }else {
                    mw.exit();
    }

    hi dek delirium,
    Thanks for the fast reply.. i have compiled the code but i got some errors ...
    i am using JCreator as IDE. i am posting the complete code and errors..
    thankyou
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.util.ArrayList;
    import javax.swing.*;
    import javax.swing.JComponent;
    // Make a main window with a top-level menu: File
    public class MainWindow extends JFrame {
        public MainWindow() {
            super("Test");
            setSize(500, 500);
            // make a top level File menu
            FileMenu fileMenu = new FileMenu(this);
            // make a menu bar for this frame
            // and add top level menus File and Menu
            JMenuBar mb = new JMenuBar();
            mb.add(fileMenu);
            setJMenuBar(mb);
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    exit();
        public void exit() {
            setVisible(false); // hide the Frame
            dispose(); // tell windowing system to free resources
            System.exit(0); // exit
        public static void main(String args[]) {
            w = new MainWindow();
            w.setVisible(true);
        private static MainWindow w ;
        protected JRadioButton r1, r2;
        protected JCheckBox  c1, c2,c3,c4,c5,c6;
        // Encapsulate the look and behavior of the File menu
        class FileMenu extends JMenu implements ActionListener {
            private MainWindow mw;
            private JMenuItem itmPE   = new JMenuItem("NEW");
            private JMenuItem itmExit = new JMenuItem("Exit");
            public FileMenu(MainWindow main) {
                super("File");
                this.mw = main;
                this.itmPE.addActionListener(this);
                this.itmExit.addActionListener(this);
                this.add(this.itmPE);
                this.add(this.itmExit);
            // respond to the Exit menu choice
            public void actionPerformed(ActionEvent e) {
                if (e.getSource() == this.itmPE) {
                    Frame f1 = new Frame("ProductMeasurementEvaluationTool");
                    f1.setSize(600,400);
                    f1.setLayout(null);
                    r1 = new JRadioButton("Radiobutton1");
                    r1.setBounds( 50, 70, 104, 24);
                    f1.add(r1);
                    r1.setBackground(Color.white);
                    r2 = new JRadioButton("Radiobutton2");
                    r2.setBounds( 280, 70, 104, 24);
                    f1.add(r2);
                    r2.setBackground(Color.white);
                    CBGroup l1 = new CBGroup(r1); // Listener that enables r1
                    CBGroup l2 = new CBGroup(r2); // Listener that enables r1
                    c1 = new JCheckBox("Checkbox1");
                    c1.setBounds( 80, 100, 93, 24);
                    f1.add(c1);
                    c1.setBackground(Color.white);
                    c2 = new JCheckBox("Checkbox2");
                    c2.setBounds( 80, 120, 93, 24);
                    f1.add(c2);
                    c2.setBackground(Color.white);
                    c3 = new JCheckBox("Checkbox3");
                    c3.setBounds( 80, 140, 93, 24);
                    l1. add (c1,c2,c3);
                    f1.add(c3);
                    c3.setBackground(Color.white);
                    c4 = new JCheckBox("Checkbox4");
                    c4.setBounds( 320, 100, 93, 24);
                    f1.add(c4);
                    c4.setBackground(Color.white);
                    c5 = new JCheckBox("Checkbox5");
                    c5.setBounds( 320, 120, 93, 24);
                    f1.add(c5);
                    c5.setBackground(Color.white);
                    c6 = new JCheckBox("Checkbox6");
                    c6.setBounds( 320, 140, 93, 24);
                    l2.add (c4,c5,c6);
                    f1.add(c6);
                    c6.setBackground(Color.white);
                    f1.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                            System.exit(0);
                    f1.setVisible(true);
                }else {
                    mw.exit();
        public class CBGroup {
            ArrayList<JCheckBox> triggers = new ArrayList<JCheckBox> ();
            JRadioButton controlledItem;
            public CBGroup(JRadioButton anItem) {
                controlledItem = anItem;
            public void add(JCheckBox... someTriggers) {
                for (JCheckBox cb : someTriggers) {
                    cb.addItemListener(new ItemListener() {
                        public void itemStateChanged(ItemEvent ie) {
                            controlItem();
                    triggers.add(cb);
            public boolean isAnyActive() {
                for (JCheckBox cb : triggers)
                    if (cb.isSelected())
                        return true;
                return false;
            private void controlItem() {
                controlledItem.setSelected(isAnyActive());
    }The errors i got are
    Z:\JCRA\MainWindow.java:115: <identifier> expected
    ArrayList<JCheckBox> triggers = new ArrayList<JCheckBox> ();
    ^
    Z:\JCRA\MainWindow.java:122: <identifier> expected
    public void add(JCheckBox... someTriggers) {
    ^
    Z:\JCRA\MainWindow.java:143: <identifier> expected
    ^
    Z:\JCRA\MainWindow.java:145: '}' expected
    ^
    4 errors

  • Help needed with EXIT_SAPLMDR1_005 for rounding

    Hi Guru's,
    We have an issue with the user exit EXIT_SAPLMDR1_005 in ECC6 system as it isn't being triggered.
    We've recently performed an SAP upgrade from 4.7 to ECC6 and when creating a PO in the 4.7 system we've stuck a breakpoint at the customer function call and noticed the code within this exit is performed. However, when doing the same thing in ECC6 system, the code is not performed.
    My understanding regarding these user exits is that a customer enhancement would exist in CMOD, however none exist in either system that calls EXIT_SAPLMDR1_005. Am I missing something? Is there a setting in config somewhere where this exit needs specifying?
    Hope someone can help, thanks
    Chris

    Hi Chris,
    that exit is part of enhancement MDR10001 that is available in ECC6, I believe.
    You don't need a project in CMOD, but the enhancement should be active in tc SMOD.
    hope it helps,
    Edgar

  • Help need with bapi for mb1a

    Hi all,
    iam creating a good movement with 201 using bapi. I created manually with the data in the t code MB1A. LATER I TRIED WITH THE SAME DATA IN PROGRAM BY PASSING THROOUGH bAPI
    BUT FOR SOME REASON IAM GETTING AN ERROR SAYING
    EKI                  222Cost center ABCD/12345 does not exist on 03/28/2007.
    but this cost center is valid till 9999. I never passed ABCD what is that?
    I TRIED WITH SAME COST CENTER IT WORKED WHILE CREATE MANUALLY WITHT THE SAME DATA IN mb1a T-CODE.
    tHIS IS MY CODE LET ME IF IAM MISSING ANYTHING
    data: gm_header  type bapi2017_gm_head_01.
    data: gm_code    type bapi2017_gm_code.
    data: gm_headret type bapi2017_gm_head_ret.
    data: gm_item    type table of
                     bapi2017_gm_item_create with header line.
    data: gm_return  type bapiret2 occurs 0 with header line.
    data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.
    clear: gm_return, gm_retmtd. refresh gm_return.
    Setup BAPI header data.
    gm_header-pstng_date = sy-datum.
    gm_header-doc_date   = sy-datum.
    gm_code-gm_code      = '03'.                                " MB1A
    Write 971 movement to table
    clear gm_item.
    move '201'                 to gm_item-move_type     .
    move '90998'  to gm_item-material.
    move '1'     to gm_item-entry_qnt.
    MOVE 'EA'    TO GM_ITEM-ENTRY_UOM.
    move 'PNT'  to gm_item-plant.
    move 'PPNT'  to gm_item-stge_loc.
    *MOVE '0901'   TO GM_ITEM-MOVE_REAS.
    move '12345' to gm_item-COSTCENTER.
    append gm_item.
    Call goods movement BAPI
    call function 'BAPI_GOODSMVT_CREATE'
         exporting
              goodsmvt_header  = gm_header
              goodsmvt_code    = gm_code
         importing
              goodsmvt_headret = gm_headret
              materialdocument = gm_retmtd
         tables
              goodsmvt_item    = gm_item
              return           = gm_return.
    if not gm_retmtd is initial.
      commit work and wait.
      call function 'DEQUEUE_ALL'.
    else.
      commit work and wait.
      call function 'DEQUEUE_ALL'.
    endif.
    write:/ gm_retmtd.
    loop at gm_return.
      write:/ gm_return.
    endloop.
    Thanks

    Hi,
    Iam abale to create a goods issue with the same data.
    The only difference i see when i create through MB1A, in the initial screen i see the collective slip has been selected and in the second when i give the cost center and hit enter it brings up the buisness area and then when i save it it creates a document number.
    I tried passing the buisness area but iam getting same error.
    If it work through mB1A then it should work through the BAPI RIGHT?
    tAKE A LOOK AT MY BAPI CODE AND LET ME KNOW IF IA M MISSING ANYTHING IN HERE
    tHANKS

  • Help needed with java

    Hello everyone
    I'm a Student and new to java and I have been given a question which I have to go through. I have come across a problem with one of the questions and am stuck, so I was wondering if you guys could help me out.
    here is my code so far:
    A Class that maintains Information about a book
    This might form part of a larger application such
    as a library system, for example.
    @author (your name)
    *@version (a version number or a date)*
    public class Book
    // instance variables or fields
    private String author;
    private String title;
    Set the author and title when the book object is constructed
    public Book(String bookAuthor, String bookTitle)
    author = bookAuthor;
    title = bookTitle;
    Return The name of the author.
    public String getAuthor()
    return author;
    Return The name of the title.
    public String getTitle()
    return title;
    and below are the questions that I need to complete. they just want me to add codes to my current one, but the problem is I don't know where to put them and how I should word them, if that makes sense.
    Add a further instance variable/field pages to the Book class to store the number of pages in the book.
    This should be of type int and should be set to 0 in the Constructor.
    Add a second Constructor with signature
    public Book(String bookAuthor, String bookTitle, int noPages) so it has a third parameter passed to it as well as the author and title;
    this parameter is used - obviously?? - to initialise the number of pages.
    Note: This is easiest done by making a copy of the existing Constructor and adding the parameter.
    Add a getPages() accessor method that returns the number of pages in the book.
    Add a method printDetails() to your Book class. This should print out the Author title and number of pages to the Terminal Window. It is your choice as to how the data is formatted, perhaps all on one line, perhaps on three, and with or without explanatory text. For instance you could print out in the format:
    Title: Robinson Crusoe, Author: Daniel Defoe, Pages:226
    Add a further instance variable/field refNumber() to your Book class. This stores the Library's reference number. It should be of type String and be initialised to the empty String "" in the constructor, as its initial value is not passed in as a parameter. Instead a public mutator method with the signature:
    public void setRefNumber(String ref) should be created. The body of this method should assign the value of the method parameter ref to the refNumber.
    Add a corresponding getRefNumber() accessor method to your class so you can check that the mutator works correctly
    Modify your printDetails() method to include printing the reference number of the book.
    However the method should print the reference number only if it has been set - that is the refNumber has a non-zero length.
    If it has not been set, print "ZZZ" instead.
    Hint Use a conditional statement whose test calls the length() method of the refNumber String and gives a result like:
    Title: Jane Eyre, Author: Charlotte Bronte, Pages:226, RefNo: CB479 or, if the reference number is not set:
    Title: Robinson Crusoe, Author: Daniel Defoe, Pages:347, RefNo: ZZZ
    Modify your setRefNumber() method so that it sets the refNumber field only if the parameter is a string of at least three characters. If it is less than three, then print an error message (which must contain the word error) and leave the field unchanged
    Add a further integer variable/field borrowed to the Book class, to keep a count of the number of times a book has been borrowed. It should (obviously??) be set to 0 in the constructor.
    Add a mutator method borrow() to the class. This should increment (add 1 to) the value of borrowed each time it is called.
    Include an accessor method getBorrowed() that returns the value of borrowed
    Modify Print Details so that it includes the value of the borrowed field along with some explanatory text
    PS. sorry it looks so messey

    1. In the future, please use a more meaningful subject. "Help needed with java" contains no information. The very fact that you're posting here tells us you need help with Java. The point of the subject is to give the forum an idea of what kind of problem you're having, so that individuals can decide if they're interested and qualified to help.
    2. You need to ask a specific question. If you have no idea where to start, then start here: [http://home.earthlink.net/~patricia_shanahan/beginner.html]
    3. When you post code, use code tags. Copy the code from the original source in your editor (NOT from an earlier post here, where it will already have lost all formatting), paste it in here, highlight it, and click the CODE button.

  • Help needed with Report Design

    Hi All,
    Here is the requirement.
    Period Type(holds 2 values) : Payment and Vested.
    we have field 'Total Days' which is calculated based on "User Selected" Period Type.
    For example, When Period Type is Payment,
    If start date is less than or equal to grant date and end date is less than or equal to vest date, then calculation is (End Date - Grant Date)+1
    If start date is greater than grant date and end date is less than or equal to vest date, then calculation is (End Date - Mobility Start Date)+1 (similarly 2 more if conditions) ...we have similar calculation for Period Type - 'Vested'.
    This Period Type is a multiselect Prompt. How can this be achievable.
    Any thoughts will be greatly appreciated.
    Thanks.

    I simply did as i got a tip on FB to do
    quote from adobe themselves on facebook "Adobe Illustrator You might also want to try asking on our forums as there are many people that can help there as well! http://forums.adobe.com/community/illustrator/illustrator_general"
    sry if it was wrong of me, simply thought there might be someone nice out there to give a helping hand
    Date: Tue, 5 Jun 2012 13:41:48 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help needed with a design!
        Re: Help needed with a design!
        created by in Illustrator - View the full discussion
    This really isn't the place to ask for free services.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4467790#4467790
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4467790#4467790. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Illustrator by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • About using categories and perspectives for new user

    We are just beginning a conversion and upgrade project to convert our Web site to Oracle Portal. I'm trying to get a good handle on some different things we need to resolve as part of the project. One of the first decisions is using Categories and Pe

  • How to created a voting list in Flash Catalyst

    Hi! What I'm trying to accomplish is for a user to select an item in a list by checking a radio button then with that one item selected click a "vote" button and then have that vote recorded. Is this possible? what I have created so far is a Datalist

  • I listed my podcast in wrong category, How do I change it?

    http://psychicstreetsmarts.blip.tv/rss/itunes/ Psychic Street Smarts- That Channel.com is in the Technology section under podcasting.... should be under Religion and Spirituality under Spirituality or Other. How do I fix it? Thanks Catherine

  • SetMnemonic for JCheckBox not working in JDK 1.4.1

    I was wondering if anyone has run across this problem. The only thing I could find on the subject in the forums had to do with HTML underlining issues. In JDK1.4.1, trying to do a setMnemonic on a JCheckBox component doesn't work. The symptoms are th

  • Remove grid lines from work sheet

    How can I format a work sheet in Numbers so that the grid lines do not show?