Java Interface as problems

Hi this code for java i am having major problems. I am a newbie to java so please be kind and hope in the feature i can master java and then help to each others. I will include the show GUI class later.
My main problem is how to assign events to the button so that it preforms a calculation.
Second what should make my GUI run properly and what actions do i need to take.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ConvertValues extends JPanel {
public class ConvertValues {
     JFrame window;
     JComboBox inputcombo,outputcombo;
     JRadioButton Length,Mass,Volume,Temperature;
     JButton = new JButton("Convert");
     JTextField outputtext, inputtext;
     public ConvertValues(){
          window = new JFrame("Imperial to Metric Converter");
          window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          window.setSize(600,600);
          window.setVisible(true);
          addRadioButtons();
          addComboBox();     
          public void addPanel(){
          Public JPanel getPanel();
          JPanel wrapper = new JPanel();
          wrapper.setLayout(new BorderLayout());
          wrapper.setBorder(BorderFactory.createEmptyBorder(13,13,13,13));
          JPanel centre = new JPanel ();
          centre.setLayout(new GridLayout(2,2));
          public void addRadiobButton(){
          JRadioButton RadioButton = new JRadioButton();
          JPanel rbut = new JPanel();
          rbut1.setLayout(new GridLayout(4,4));
          JPanel panel1 = new JPanel();
          JLabel metric = new JLabel (" Length Metric Values")
          panel1.add(metric);
          rbut1.add (panel1);
          JPanel panel2 = new JPanel();
          JTextField text1 = new JTextField (13);
          panel2.add(text1);
          rbut1.add(panel2);
          JPanel panel3 = new JPanel();
          JLabel imperial = new JLabel ("Length Imperial Values")
          panel3.add(Imperial);
          rbut1.add (panel3);
          JPanel panel4 = new JPanel();
          JTextField text2 = new JTextField (13);
          panel4.add(text2);
          rbut1.add(panel4);
          JPanel rbut2 = new JPanel();
          rbut2.setLayout(new GridLayout (4,4));
          JPanel panel5 = new JPanel ();
          JLabel metric2 = new JLabel ("Liquid Metric Values");
          panel5.add(metric2)
          rbut2.add(panel5);
          JPanel panel6 = new JPanel ();
          JTextField text3 = new JTextField (13);
          panel6.add(text3);
          rbut2.add(panel6);
          JPanel panel7 = new JPanel ();
          JLabel imperial2 = new JLabel ("Liquid Imperial Values");
          panel5.add(imperial2)
          rbut2.add(pane7);
          JPanel panel8 = new JPanel ();
          JTextField text4 = new JTextField (13);
          panel8.add(text4);
          rbut2.add(panel8);
          JPanel rbut3 = new JPanel();
          rbut3.setLayout(new GridLayout (4,4));
          JPanel panel9 = new JPanel ();
          JLabel metric3 = new JLabel (" Mass Metric Values");
          panel9.add(metric3)
          rbut3.add(panel9);
          JPanel panel10 = new JPanel ();
          JTextField text5 = new JTextField (13);
          panel10.add(text5);
          rbut3.add(panel10);
          JPanel panel11 = new JPanel ();
          JLabel imperial3 = new JLabel ("Mass Imperial Values");
          panel11.add(imperial3)
          rbut3.add(pane11);
          JPanel panel12 = new JPanel ();
          JTextField text6 = new JTextField (13);
          panel12.add(text6);
          rbut3.add(panel12);
          JPanel rbut4 = new JPanel();
          rbut4.setLayout(new GridLayout (4,4));
          JPanel panel13 = new JPanel ();
          JLabel metric4 = new JLabel (" Temperature Metric Values");
          panel13.add(metric4)
          rbut4.add(panel13);
          JPanel panel14 = new JPanel ();
          JTextField text6 = new JTextField (13);
          panel14.add(text6);
          rbut4.add(panel14);
          JPanel panel15 = new JPanel ();
          JLabel imperial4 = new JLabel ("Temperature Imperial Values");
          panel15.add(imperial4)
          rbut4.add(pane15);
          JPanel panel16 = new JPanel ();
          JTextField text7 = new JTextField (13);
          panel16.add(text7);
          rbut4.add(panel16);
          radiopanel.add("Length","rbut1")
          radiopanel.add("Liquid Mass","rbut2")
          radiopanel.add("Mass","rbut3")
          radiopanel.add("Temperature","rbut4")
          public void addComboBox(){
          JPanel panel17 = new JPanel();
          String[] str = {"Milliimeters", "Centimeters", "Meters", "Kilometers"};
          JComboBox metricvalues = newJComboBox(str);
          panel17.add(metricvalues);
          rbut1.add(panel17);
          JPanel panel18 = new JPanel();
          String[] str2 = {"Inch", "Foot", "Yard", "Mile"};
          JComboBox imperialvalues = newJComboBox(str2);
          panel18.add(imperialvalues);
          rbut1.add(panel18);
          JPanel panel19 = new JPanel();
          String[] str3 = {"Litres", "Millilitres", "Litres"};
          JComboBox metricvalues = newJComboBox(str3);
          panel19.add(metricvalues);
          rbut2.add(panel19);
          JPanel panel20 = new JPanel();
          String[] str4 = {"Fluid", "Ounce", "Pint", "Quart", "Gallon"};
          JComboBox imperialvalues = newJComboBox(str4);
          panel20.add(imperialvalues);
          rbut2.add(panel20);
          JPanel panel21 = new JPanel();
          String[] str5 = {"Grammes", "Kilogrammes", "Metric Tonne"};
          JComboBox metricvalues = newJComboBox(str5);
          panel21.add(metricvalues);
          rbut3.add(panel21);
          JPanel panel22 = new JPanel();
          String[] str6 = {"Ounce", "Pound", "Stone", "Long Ton"};
          JComboBox imperialvalues = newJComboBox(str6);
          panel22.add(imperialvalues);
          rbut3.add(panel22);
          JPanel panel23 = new JPanel();
          String[] str6 = {"Grammes", "Kilogrammes", "Metric Tonne"};
          JComboBox metricvalues = newJComboBox(str6);
          panel23.add(metricvalues);
          rbut4.add(panel23);
          JPanel panel24 = new JPanel();
          String[] str7 = {"Ounce", "Pound", "Stone", "Long Ton"};
          JComboBox imperialvalues = newJComboBox(str7);
          panel24.add(imperialvalues);
          rbut4.add(panel24);
          frame.getContentPane().add(center, BorderLayout.CENTER);
          public void addLabelandtext();{
          inputlabel = new JLabel("Enter Value");
          valuelabel = new JLabel("0");
          metricLabel = new JLabel ("Metric Value");
          imperial value = new JLabel("Imperial Value");
          outputtext = new JTextField(8);
          inputtext = new JTextField (8);
          JPanel labelpanel = new JPanel();
          labelpanel.add(inputlabel);
          labelpanel.add(mJPanel panel25 = new JPanel();
          labelpanel.add(imperiallabel);
          labelpanel.add(valuelabel);
          labelpanel.add(outputtext);
          labelpanel.add(inputtext);
          JPanel top = new JPanel(new GridLayout(5,3));
          middle.add(labelpanel);
          frame.getContentPane().add(middle,BorderLayout.SOUTH);
          public void ConvertButton();{
               JPanel panel25 = new JPanel();
               JButton convert = new JButton ("CONVERT");
               Convert.addActionListener(this);
               panel25.add(convert);
               rbut1.add(panel 25));
               JPanel panel26 = new JPanel();
               JButton convert = new JButton ("CONVERT");
               Convert.addActionListener(this);
               panel26.add(convert);
               rbut2.add(panel 26));
               JPanel panel27 = new JPanel();
               JButton convert = new JButton ("CONVERT");
               Convert.addActionListener(this);
               panel27.add(convert);
               rbut3.add(panel 27));
               JPanel panel28 = new JPanel();
               JButton convert = new JButton ("CONVERT");
               Convert.addActionListener(this);
               panel28.add(convert);
               rbut4.add(panel 28));
          public void LengthConverter();{
          Let measurement = TextIO.getDouble()
          Let units = TextIO.getlnword();
          if the units are inches
               Let inches = measurement
          else if the units are milimeters
               Let inches = measurement*25.4
          else if the units are Foot
               Let centirmeter = measurement*30.48
          else if the units are Yard
               Let meter = measurement*0.9144
          else if the units are mile
               let kilometers = measurement*1.609
          else if the unit are meters
               let centimeters = measurement*100
          else
               The units are wrong!
               Print an error message and stop processing
          let milimeter = inches/25.4
          let foot = centimeters/30.48
          let Yard = meter/0.9144
          let mile = kilometers/1.609
          let meter = centimeter/100
          dispay the results
          public void VolumeConverter();{
               Let measurement = TextIO.getDouble()
          Let units = TextIO.getlnword();
          if the units are Fluid Ounce
               Let Fluid Ounce = measurement
          else if the units are mililitres
               Let Fluid Ounce = measurement*28.41
          else if the units are Pint
               Let Litres = measurement*0.568
          else if the units are Quart
               Let Litres = measurement*1.14
          else if the units are Gallon
               let litres = measurement*4.54
          else if the unit are litres
               let centilitres = measurement*100
          else
               The units are wrong!
               Print an error message and stop processing
          let mililitres = Fluid Ounce/28.4
          let Pint = Litres/0.568
          let Quart = Litre/1.14
          let Gallon = Litres/4.54
          let litre = centilitre/100
          dispay the results
          public void WeightConverter();{
               Let measurement = TextIO.getDouble()
          Let units = TextIO.getlnword();
          if the units are Ounce
               Let Ounce = measurement
          else if the units are Grammes
               Let Ounce = measurement*28.35
          else if the units are Pound
               Let kilograms = measurement*0.4536
          else if the units are Stone
               Let Kilogrammes = measurement*6.3503
          else if the units are Longton
               let metric tonne = measurement*1.016
          else if the unit are Gramme
               let Killogram = measurement*100
          else
               The units are wrong!
               Print an error message and stop processing
          let Gramme = Ounce/28.35
          let Pound = Kilogram/0.4536
          let Stone = Killogrammes/6.3503
          let Longton = metrictonne/1.016
          let Gramme = Kilogram/100
          dispay the results
          private static void createAndShowGUI();{
               ConvertValues newScreen = new ConvertValues();
     }

My main problem is how to assign events to the button so that it preforms a calculation. [url http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]How to Use Buttons
Also, use the "Code Formatting Tags" when posting code so it retains its original formatting and is readable.

Similar Messages

  • Java Interface Question.

    There are classes in the Java SDK, such as the Interface:
    org.w3c.dom.Document
    that have factory methods in them that carry out actual operations.
    But how can this be possible, because when I program an interface:
    public interface test {
    public void setString(String s);
    It will only compile thus, with no implementation on the method signatures?
    How do Java interfaces with factory methods to this?
    org.w3c.dom.Node is another one. Where does the functionality/method implementation
    come from?

    public interface MyInterface {
         public void method1();
    class MyImplementation implements MyInterface {
         public void method1(){
    public class MyFactory {
         public static MyInterface createMyInterface(){
              return new MyImplementation();
    public class Test{
               public static void main(String args[]){
                      MyInterface x=MyFactory.createMyInterface();
                      x..method1();
    }Now can you understand this? Assume all These classes are separate classes. This is not a problem with inner classes. Before make a reply, try to understand it or post a reply as saying it is not clear rather than posting this kind of post.

  • Java interface as an Axis Web Service

    Hi averybody:
    I'm developping an application containning a web service using Axis 1.2 with Tomcat 5.5.7. I had design a Java interface for the WS and create mi deploy.wsdd file for it using Message-style.
    Everithing goes right in deployment process, but when i try too use de WS from a client, i get de following error:
    Exception in thread "main" AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.InstantiationException: chatService.IChatServer
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}hostname: visit18 (este el nombre de esta m�quina)
    java.lang.InstantiationException: chatService.IChatServer (esto es lo que da problema)
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
    .java:260)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
    java:169)
    at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri
    alizationContextImpl.java:1015)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar
    ser.java:585)
    at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespa
    ceBinder.java:898)
    at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBind
    er.java:644)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
    XMLDocumentFragmentScannerImpl.java:1008)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
    LDocumentFragmentScannerImpl.java:329)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
    a:525)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
    a:581)
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
    ava:1175)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
    tionContextImpl.java:242)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at samples.message.TestChatMsg.doit(TestChatMsg.java:64)
    at samples.message.TestChatMsg.main(TestChatMsg.java:86)
    The code of my interface is this:
    public interface IChatServer {
    public void connect(SOAPEnvelope req, SOAPEnvelope resp);
    public void disconnect(SOAPEnvelope req, SOAPEnvelope resp);
    public void publishMessage(SOAPEnvelope req, SOAPEnvelope resp);
    public void retrieveMessages(SOAPEnvelope req, SOAPEnvelope resp);
    public void retrieveUsers(SOAPEnvelope req, SOAPEnvelope resp);
    Can anybody tell me what's happening here...
    Thanks.

    Hi, did you find out what the problem was ?
    I've got the same problem.
    Thanks,
    Lotte

  • Could not convert from java interface to interface type wsdl ??

    i have a problem wheni have a problem when i develop bpel using mediator and wire to ejb service. When the mediator wire to ejb service, i found the error : Could not convert from java interface to interface type wsdl.... How to solve the problem?

    I followed the case closely (with the same name of classes, methods, etc), but still get the error: “Could not convert from java interface to interface type wsdl.Exception=nl.amis.calculator.Calculator”. I created a Java class to test the lookup and function correctly. However, when I try to wire a Mediator to this Reference, I run into an Interface Conversion Error. I’ve included the line javaInterface = “nl.amis.calculator.Calculator” in file composite.xml, but still get error. Could you help me?

  • Java interface with xml communication

    Hello everybody,
    For a project i need to make a java interface with xml communication.
    For example ; from 1 laptop I press on a java button and then i need to get a text message on the other laptop.
    The java interface is already created now the xml code for communication.
    I hope someone can help me how to start with the xml code.
    Are there any templates that i can use?

    I need to use XML for this, cause it is in the
    assignment.As far as communication is concerned, it doesn't matter that you are sending XML. You can send any kind of data. So first find out how to send data, then send data which is XML.
    I only want to know if its possible to send data/text
    from 1 laptop (windowsxp prof) to the other laptop
    (also windows xp prof).Provided the other laptop is running a server that can receive that data.
    Maybe its easier if I send data to a specific IP
    address?Provided there is a server running at that IP address that can receive that data. You can use an IP address to connect to a server but that has nothing to do with sending the data.
    Its important that the communication between 2 system
    is in XML language.XML is not a programming language. XML is a format for storing data. You can certainly send XML-formatted data between two computers.
    So i hope u have a solution for my problem.The solution would be for you to learn how communication between two computers works in the real world. If you have an assignment that says you have to make communication work, surely there was something taught to you before about how to do it?

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Re   Java Stored Procedure Problem

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

  • "How to Resolve ORA-29532 Java 2 Permission Problems in RDBMS 8.1.6 and 8.1.7"

    I'm in the process of publishing the following note (134280.1), titled "How to Resolve ORA-29532 Java 2
    Permission Problems in RDBMS 8.1.6 and 8.1.7".
    It will be accessible from Oracle Support's "Metalink" site.
    "How to Resolve ORA-29532 Java 2 Permission Problems in RDBMS 8.1.6 and 8.1.7".
    Problem Description
    Periodically an application running in the Enterprise Java Engine
    (EJE) formerly known as the "Oracle 8i JVM", "the JSERVER component", or
    the "Aurora JVM" will fail with a "java 2" permissions error having the
    following format :
    Note : Message shown below have been reformatted for easier readability.
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception:
    usually followed by a detailed error message similar to one of the following
    messages :
    Example # 1
    java.security.AccessControlException: the Permission
    (java.net.SocketPermission hostname resolve)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
    Example # 2
    java.security.AccessControlException: the Permission
    (java.util.PropertyPermission * read,write)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
    Example # 3
    java.security.AccessControlException: the Permission
    (java.io.FilePermission \matt1.gif read)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
    Explanation
    The java 2 permission stated in line # 2 of each of the above "Examples"
    has not been granted to the user specified in line 4 of the above "Examples".
    Solution Description
    The methodology to solve this issue is identical for all java 2 permissions
    cases.
    1) Format a call "dbms_java.grant_permission" procedure as described below.
    2) Logon as SYS or SYSTEM
    3) Issue the TWO commands shown below
    4) Logoff as SYS or SYSTEM
    5) Retry your application
    For Example # 1
    1) Logon as SYS or SYSTEM
    2) Issue the following commands :
    a) call dbms_java.grant_permission('SCOTT',
    'java.net.SocketPermission',
    'hostname',
    'resolve');
    b) commit;
    Note: Commit is mandatory !!
    3) Logoff as SYS or SYSTEM
    4) Retry your application
    For Example # 2
    1) Logon as SYS or SYSTEM
    2) Issue the following commands :
    a) call dbms_java.grant_permission('SCOTT',
    'java.util.PropertyPermission',
    'read,write');
    b) commit;
    Note: Commit is mandatory !!
    3) Logoff as SYS or SYSTEM
    4) Retry your application
    For Example # 3
    1) Logon as SYS or SYSTEM
    2) Issue the following commands :
    a) call dbms_java.grant_permission('SCOTT',
    'java.io.FilePermission',
    '\matt1.gif',
    'read');
    b) commit;
    Note: Commit is mandatory !!
    3) Logoff as SYS or SYSTEM
    4) Retry your application
    References
    For more details on java 2 permissions and security within the EJE, review
    Chapter 5, in the Java Developer's Guide. entitled,
    "Security For Oracle8i Java Applications"
    The RDBMS 8.1.7 version can be found at :
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/index.htm

    Hi, Don,
    I solved the problem of security exception I mentioned at java procedure topic as following:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException
    I tried to use your solution as following:
    call dbms_java.grant_permission('SDE', 'java.net.SocketPermission', 'ORCL.COHPA.UCF.EDU','resolve');
    but SQL*plus gave me a error message:
    invalid collumn.
    What's the problem?
    However, I call a grant command as following:
    SQL> grant JAVASYSPRIV to sde;
    and then that exception is gone. What's the difference between dbms_java.grant_permission and grant command?
    Thanks
    Bing
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by don -- oracle support:
    I'm in the process of publishing the following note (134280.1), titled "How to Resolve ORA-29532 Java 2
    Permission Problems in RDBMS 8.1.6 and 8.1.7".
    It will be accessible from Oracle Support's "Metalink" site.
    "How to Resolve ORA-29532 Java 2 Permission Problems in RDBMS 8.1.6 and 8.1.7".
    Problem Description
    <HR></BLOCKQUOTE>
    null

  • Ivette manzur : Interface errors problems on cisco 3560

    Hello,
    I have a problem on one of the interfaces on a cisco 3560 switch. In fact, I set up a monitoring network recently (cacti), and I have a significant number of errors on the interfaces. the problem is that when I do a sh interface I see no errors, and even by making a clear counters it does not solve my problem .. I also changed the wiring with cat 6 cables but nothing has changed ..
    What are the main causes of errors on an interface of a switch? what should I do in this case?
    Thank you for your help in advance
    ivette manzur

    Hello,
    I've a e61i and I experience a similar problem. My phone work very well on WiFi network with no encryption as well as 64-bit wep.
    At home I've 2 wireless routers, both encrypted at 128 bits, one with WEP and the other with WPA. On both of them I can correctly obtain an IP thru DHCP, but the traffic do not go thru.
    By using IfInfo I think I discovered the reason of the problem (unless IfInfo is not working properly...) and it seems a bug related to the netmask, broadcast and gateway settings. The router is 192.168.15.1 and this is what I get:
    1) DHCP case -- I get two IP adresses: the 169.254.x.x and the one assigned to the router. DNS is also set properly, but both gateway, broadcast and netmask are set to 0.0.0.0 for both IPs.
    IP Addr: 169.254.162.106
    Netmask: 0.0.0.0
    Broadcast: 0.0.0.0
    Gateway: 0.0.0.0
    DNS1: 192.168.15.1
    IP Addr: 192.168.15.100
    Netmask: 0.0.0.0
    Broadcast: 0.0.0.0
    Gateway: 0.0.0.0
    DNS1: 192.168.15.1
    2) Static IP 192.168.15.64, netmask set to 255.255.255.0 and gateway and DNS set to 192.168.15.1. The 169.254.x.x disappears and I get only one IP which is set to:
    IP Addr: 192.168.15.64
    Netmask: 0.0.0.0
    Broadcast:192.168.15.255
    Gateway: 192.168.15.1
    DNS1: 192.168.15.1
    So in conclusion, it seems that with 128bit encryption, in the DHCP case gateway, broadcast and netmask are not assigned correctly! While in the Static IP case the netmask is still not assigned correctly!!!
    Hope this can help...
    --AP

  • Are Java Interfaces 'free'?

    From a performance point of view, are Java interfaces free?
    That is, if I have:
    class Foo
    public void bar() { ... // some code }
    }and I change it to:
    interface Foo
    public void bar();
    class FooImpl implements Foo
    public void bar() { ... // some code }
    }And I call one or other of the Foos like
    Foo foo // A parameter, field or local variable.
    foo.bar();Does calling foo through an interface add any overhead that calling it direct in the first example not? As I understand it, all methods are 'virtual' in Java, so it should perform the same in either case.
    Thanks for any of your thoughts.
    Rupert

    rupertlssmith wrote:
    YoungWinston wrote:
    The Second Rule of Program Optimization (for experts only!): Don't do it yet.&#148;
    - Michael A. Jackson
    Basically, don't worry about it. Worry about writing clear, correct, object-oriented code.
    Wierdly enough, in the long run, that is more likely to help than anything else you can do, should (and if) you ever need to worry about optimization in the future.
    WinstonThanks for the advice. I can write good clear OO code. I am now at the future and worrying about optimization, so have made it past the second rule!Then you exactly know where your bottleneck is from the profiler you've used. Did it tell you that your interfaces are the bottleneck? If so, why do you even bother to ask here?

  • Java interface with Crystal Reports

    Post Author: [email protected]
    CA Forum: JAVA
    Hello everyone,I need to build a Java interface for JSP to interact with crystal reports.Could anyone recommend any book or forward me the url's where I can find the related material with examples. Eagerly Waiting for reply!Thanks,Prathima.

    Post Author: MJ@BOBJ
    CA Forum: JAVA
    The latest version of the Java Report Component (JRC) is available from the Diamond website.  This download is actually a plugin for Eclipse but you can still use the JRC runtime jars to use the SDK APIs in your JSP page.  You will also find lots of resources such as samples, videos, and forums to help you get started.  You can also refer to the DevLibrary for more information.

  • Can I take Java interface as .h of C?

    Can I use Java interface as a substitute of .h files in C?

    It almost sounds as if you want to use C, not an OOP language like Java. So why not use C?

  • Java interfaces allow us to specify limited ways in which otherwise

    can anyone explain "Java interfaces allow us to specify limited ways in which otherwise dissimilar classes, from completely different parts of inheritance hierarchy, resemble one another." please?
    many thanks.

    An interface defines a contract which an implementing class must fulfill. As long as the implementing class is written properly, then it provides a specific, advertised behavior. There are no restrictions as to which classes may implement a given interface (in the sense that there are inheritance restrictions, such as single-inheritance, no inheritance loops, and the like). Therefore, any two arbitrary classes may implement the same interface, and therefore provide the same behavior.
    For example, the Iterator interface provides the ability to loop over a collection of objects in a well-defined way. Any class which implements Iterator would be manipulable in the same way, and could therefore be said to resemble each other.

  • Mediator To Spring Error-Could not convert from java interface to interface

    Hi,
    I have a requirement to using a Spring component and my composite application would be File Read -> Mediator -> Spring Component -> File Write.
    I have to read a file and using mediator map the same to the Spring input and write the Spring component output to a file.
    I have created a Java interface ( Package Name - transformtospring , Interface Name - TransformInterface) and also created a Java Class ( TransformImpl ) which implements the Interface in this package. Saved all these artifacts in SCA-INF/src folder of the application.
    My Spring Bean configuration file is as follows ( saved the file in the same folder as composite.xml )
    <?xml version="1.0" encoding="windows-1252" ?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:util="http://www.springframework.org/schema/util"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:lang="http://www.springframework.org/schema/lang"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-2.5.xsd http://xmlns.oracle.com/weblogic/weblogic-sca META-INF/weblogic-sca.xsd">
    <!--Spring Bean definitions go here-->
    <bean class="transformtospring.TransformImpl" name="TransformBean"/>
    <sca:service name="TransformService" target="TransformBean"
    type="transformtospring.TransformImpl"/>
    </beans>
    I have created a Spring Context which uses the above Spring Configuration. When i tried to map the mediator output to Spring , i'm getting an error shown below.
    " Could not convert from java interface to interface type wsdl . Exception=java.lang.ClassNotFoundException transformtospring.TransformImpl "
    Please do let me know where exactly i'm doing wrong.
    Regards,
    Sri.

    Hi All,
    I could able to work this one out now !!!
    But i'm having an issue mapping the input to this service. The method signature for the service is as follows:
    public byte[] processData(byte[] input) throws Throwable{
    So the input for this Service is a byte array. Now i'm mapping the data from a File Input ( Read File - opaqueElement ) to this service directly ( using mediator ).
    Now when i have looked into the message in the Enterprise Manager, following is the message structure from Read File input to the service.
    <message>
    <properties>
    <property name="tracking.compositeInstanceId" value="10009"/>
    <property name="tracking.ecid" value="bcd04297e25136e7:4869a9c:13316255efc:-8000-0000000000001f79"/>
    <property name="tracking.conversationId" value="TJ9PCcbtu3S0DA0GuxsGx13RYUb1NxHNndfk2PC8ukk."/>
    </properties>
    <parts>
    <part name="parameters">
    <ns0:processCollaboration>
    <arg0>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bnMwOkFkZDJJbnB1dCAgeG1s bnM6eHNpPSdodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZScgeG1sbnM6 bnMwPSd1ay5jby5qZHdpbGxpYW1zLkFkZDJJbnB1dCcgeHNpOnNjaGVtYUxvY2F0aW9uPSd1ay5j by5qZHdpbGxpYW1zLkFkZDJJbnB1dCByZXF1ZXN0LnhzZCcPG5zMDpudW0xPjEwPC9uczA6bnVt MT48bnMwOm51bTI+MTY8L25zMDpudW0yPjwvbnMwOkFkZDJJbnB1dD4=+</arg0>
    </ns0:processCollaboration>
    </part>
    </parts>
    </message>
    and the corresponding response message ( No output ) back from the service is:
    <message>
    <properties>
    <property name="tracking.compositeInstanceId" value="10009"/>
    <property name="tracking.ecid" value="bcd04297e25136e7:4869a9c:13316255efc:-8000-0000000000001f79"/>
    <property name="componentName" value="ProcessCollab"/>
    <property name="tracking.conversationId" value="TJ9PCcbtu3S0DA0GuxsGx13RYUb1NxHNndfk2PC8ukk."/>
    <property name="compositeDN" value="default/CollaborationToSpring!1.0*soa_a8da1da7-f98f-4935-8d20-da9e7bc003cc"/>
    </properties>
    <parts>
    <part name="parameters">
    <processCollaborationResponse>
    <return/>
    </processCollaborationResponse>
    </part>
    </parts>
    </message>
    I have included System.out statements in my Java class , but its not printing anything in the logs.
    I'm under the impression that the underlying infrastructure ( mediator ) transparently encodes and decodes data from base64Binary to java byte array. So could anyone help me on this !!!
    Regards,
    Sri.

  • Any good article on Java Interface usage principle?

    Hi All
    I find Java interface is quite good concept, but some expert mentioned in some article, "Don't over use it".
    Just wonderring anyone can point me to some good article on the internet on In what kind sceniaro we need use Interface, in which case we'd better not use it.
    Thanks in advance.
    Steven

    Then how do you explain some gurus said" don't overuse interface"?I explain it thus:
    (a) it doesn't actually contradict what the article says
    (b) 'don't overuse interfaces' is a tautology: it doesn't actually say anything very useful.
    On the other hand there's no reason why "some gurus" can't disagree with Holub. I disagree myself to a large extent. You can define your entire API as interfaces, but then you're committed to all kinds of factory methods, and provision of secret implementation classes, etc. This can get pretty tedious pretty quickly. And, somewhere or other, you must have at least one actual class, so that you can have either a static method or a constructor, so you can get hold of your initial factory, or factory builder, or factory builder factory, or factory builder factory builder, or wherever it is that you want to start.
    I've used frameworks where there were four different implementation classes for the same interface. Never did find out why. Something wrong somewhere.
    When you can keep your base classes stable, I don't see a reason not to use them. 'Base class fragility' is all that Holub is really complaining about, and there are lots of solutions to that, such as 'don't' for a start. Java is chock full of stable base classes.

Maybe you are looking for

  • Purchased songs not showing up in account

    I have music that i have purchased on a pervious device, with the same account. I have a new device and am trying to download the music on and it is not showing on the device that i have purchased this music. I have another device hooked up to the sa

  • Firefox doesn't handle Flash

    Whenever I try to load a video in YouTube, the audio plays but the video and the video controls do not load. I can get the videos to work on Facebook, but when I right-click and select "Settings" nothing responds to mouse clicks. Firefox also cannot

  • Reinstall MAC OSX

    Can I reinstall my OS w/o format my HD?

  • XSAN Lun not visible

    Hello, Hello I have XSAN with 4 MacPro's. Two of them are MDC and two clients. Suddenly the volumes disappeared from one of the clients. I checked on one of the mdc and the volumes were visible but in Xsan admin there was a message No visible luns. I

  • How to restart Oracle JVM.

    I have a requirement to bounce the oracle JVM without restarting the database. Is it doable? if yes then how? I am using oracle 9.2