HOW TO use OCX controls with Java application

hi
Is it possible to use microsoft Ocx controls in java applications.

Anything is possible. You might want to ask if it's a good idea, but look at some of the people who have asked before. It looks like there are products out there to help.
http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aocx&col=javaforums&x=19&y=13

Similar Messages

  • How to use a proxy with java applications?

    I have a nokia 6300 type s40v3
    hello,
    I would like to know if it is possible to use a proxy of any and how ? kind with java applications.
    thank you

    Well, it works well when, into my applet, i do somethig like this:
    URL url = new URL(host);
    URLConnection connexion = url.openConnection();My applet uses proxy setting from IE6 but only if i use Java 1.4.2_08.
    With IE6 and Java 1.5.04, it doesn't work (my applet doesn't use proxy settings)
    With Firefox and Java 1.5.04, it's ok
    Have you already seen a problem like this with Java 1.5.04 ?

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • How to use MyFaces component with Java Creator 2

    Please advise for me the way to use Myfaces component with Java Creator 2. Thanks

    Apologies for the late reply, but currently what exists generally for MyFaces integration with Creator is on this blog:
    http://wiki.java.net/bin/view/Javatools/CustomComponentLibraries
    You might also want to post the same question on the nbusers alias on netbeans.org, referencing Visual Web Pack
    Regards,
    -Brad Mayer

  • How to use OLE Components in Java Application?

    Hi,
    I try to make program that is able to include OLE components( Excel sheet, MS Word document, and so on ), and that can control these components.
    I want to know that Java Application or Applet can control and show OLE components like JavaBeans components. If that, How to ?

    Try this to generate a Word file.....
    import com.jacob.activeX.*;
    import com.jacob.com.*;
    public class ExportDOC {
    public ExportDOC () {
    //Application type
    ActiveXComponent doc = new ActiveXComponent("Word.Application");
    //Application visible
    doc.setProperty("Visible", new Variant(true));
    Object documents = doc.getProperty("Documents").toDispatch();
    //Open a file already exits
    //Object document = Dispatch.call(documents, "Open", "c:/nameFile.doc").toDispatch();
    //Open a new file empty
    Object document = Dispatch.call(documents, "Add", "").toDispatch();
    Object selection = Dispatch.get(doc,"Selection").toDispatch();
    //Text Format
    Object font = Dispatch.get(selection, "Font").toDispatch();
    Object alignment = Dispatch.get(selection, "ParagraphFormat").toDispatch();
    Object image = Dispatch.get(selection, "InLineShapes").toDispatch();
    //I put the selection at the end of the file for if I want to add text
    //Dispatch.call(selection, "EndKey", "6");
    //Text format (bold & italic)
    Dispatch.put(font, "Bold", "1");
    Dispatch.put(font, "Italic", "1");
    //To jump line
    Dispatch.call(selection, "TypeParagraph");
    //Align center (0= left, 1=center, 2=right, 3=justify)
    Dispatch.put(alignment, "Alignment", "1");
    //Insert image
    Dispatch.call(image, "AddPicture", "c:/graf.jpg");
    Dispatch.call(selection, "TypeParagraph");
    Dispatch.put(alignment, "Alignment", "3");
    //Insert Text
    Dispatch.call(selection, "TypeText", "Text ....... ");
    //Original values
    Dispatch.call(selection, "TypeParagraph");
    Dispatch.put(alignment, "Alignment", "0");
    Dispatch.put(font, "Bold", "0");
    Dispatch.put(font, "Italic", "0");
    //To jump page
    //Dispatch.call(select, "InsertBreak");
    //Save the document
    //Dispatch.call(document, "SaveAs", "c:/test.doc");
    //Quit the application
    //dc.invoke("Quit", new Variant[] {});
    public static void main(String[] args) {
    ExportDOC e = new ExportDOC();
    but you must download 'jacob.jar' in....
    http://users.rcn.com/danadler/jacob/
    is a FREEWARE!!!
    regards!!

  • How to use Thread.sleep() with Java Berkeley Base API?

    Hi,
    I have explained the weird problem about the server was too busy to response to SSH but it continued to finish to run (Server not response when inserting millions of records using Java Base API
    Even I tried to increase CachSize and renice Java program, but it did not work. So, I am thinking to set sleeping time for threads in Java Berkeley Base API (using “ps” command, there were 18 light weight processes created). My program did not implement transaction or concurrency because it simply creates (millions) databases records only. Is it possible and correct to do like this in the code:
    try{
    //do create a db record
    Thread.currentThread().sleep(1000);//sleep for 1000 ms
    catch(ItrerruptedException ie){
    Thank you for your kindly suggestion.
    Nattiya

    where can I get the help doc about use AT commands in java.
    Can you give me some code example about this. It is
    difficulty to me to write it myself.You simply have to send the characters and receive the characters via the comm extension. Here is the ITU standard command set - http://ridge.trideja.com/wireless/atcommands/v250.pdf. Various modems and other devices extend this in a number of ways, you may need to find documentation specific to your device as well. But start with the standard.

  • How to use parameter file with java

    Is it possible to use a parameter file with Java, and is there any class/method to make it easy to call and use these parameter from a text file, other than scanning the whole text file manually as we can do normally with visual basic/c++, so we can call the program with the parameter file, like java testing c:\\testing.ini

    If I understand you correctly, you may be looking for a properties file. This is basically a text file that contains pairs of strings in the form:
    parameter1=value1
    parameter2=value2
    parameter3=value3
    ...etc.
    and the values are retrieved using the java.util.Properties class - see:
    http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
    Sample use://Call chis method once, to load the props file.
    //props file is called "demo.properties", and is
    //in a directory that is included in the classpath
        private void loadMyProperties() throws Exception
         InputStream stream = getResourceAsStream("/demo.properties");
         if(stream == null)
             throw new Exception("stream is null!");
         demoProperties = new Properties();
         demoProperties.load(stream);
         stream.close();
    // Then you can retrieve properties in your code using:
    String param3 = demoProperties.getProperty("parameter3");
    //...etc

  • How to create a folder with java application?

    Hi expert
    I would like to read some tutorial or manual to understand the logic behind the management of the folder and document from a java application in KM.
    Anyone could help me?
    thank you
    Andrea

    Dear Andrea,
    Please have a look to below documents might help.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30a2a087-190f-2d10-07a4-dad666b44c1f?QuickLink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/Snippets/KMLibrary-ReusableComponentforWebDynpro+Java
    Best Regards,
    Arun Jaiswal

  • How to use Xpath effectively with Java

    I am using Xpath for parsing a String with following syntax.This is a string suppose String xmlShopstring.
    <shopper>
                <upc>0123456789</upc>
                <desc>Planeters Peanutus</desc>
                <regprice>1.99</regprice>           
                <errorcode></errorcode>
            </shopper>In this case how can I use xpath parsing ?

    You can use classes from javax.xml, org.w3c.dom packages for performing XML operations in java.
    These APIs have very rich set of classes and methods for performing XML operations effectively.
    pravi.pravi wrote: how can I use xpath parsing?You need to parse XML String to org.w3c.dom.Document with use of following classes:
    javax.xml.parsers.DocumentBuilderFactory
    javax.xml.parsers.DocumentBuilderOnce you parse XML String to org.w3c.dom.Document you can use following classes and others for very effective XPath parsing.
    javax.xml.xpath.XPathFactory
    javax.xml.xpath.XPath
    javax.xml.xpath.XPathExpression
    javax.xml.xpath.XPathConstantsI have listed some classes which can help you to perform XPath parsing, you should also explore other classes in the API for more XML operations.
    Refer thread: http://forums.sun.com/thread.jspa?threadID=5357836
    Thanks,
    Tejas Purohit

  • How to use Crystal Report with Java - need help

    Dear everyone,
    i am completely new to Crystal report , please can anyone help me to creat a very simple Report using the Crystal report,
    the report will show some records from oracle DB.
    How can i make it by a simple example and with code please?
    do i need any JAR or Bean for Crystal report?
    thanks for your help and please don't hesitate to contact me in case of any inquiries.
    my email: [email protected]
    Thanks in advance

    I what to use Crystal report to generate report.My programe in java swing .Iam retrive table from database in Jtable .But when giving print
    command its print half screen .so that why I wantto usecrystal report
    package file2;
    import file2.choice;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import java.util.*;
    import java.awt.print.*;
    import javax.swing.table.*;
    import com.sun.java.swing.*;
    import javax.swing.JTable;
    public class cour extends JFrame implements Printable
         //Menu fileMenu;
         public static void main(String[] a)
    cour n = new cour();
    n.setVisible(true);
    public cour()
         super("Course Report");
         report();
         protected void report()
              JPanel panel = new JPanel();
         JButton printButton = new JButton("Print");
         panel.add(printButton);
         JButton exitButton = new JButton("Exit");
         panel.add(exitButton);     
         DefaultTableModel defaulttablemodel = new DefaultTableModel();
              JTable jtable = new JTable(defaulttablemodel);
              panel.add(new JScrollPane(jtable));
              String      tempname="";
              int tempcnt;
              String driver="sun.jdbc.odbc.JdbcOdbcDriver";
              String url="jdbc:odbc:regs";
              Object[] data = new Object[4];
              try
                             Class.forName(driver);                         
                             Connection connection=DriverManager.getConnection(url,"sa","");
                             Statement statement = connection.createStatement();     
                             String query = "SELECT courseid as CourseID,coursen as CourseName,cfee as Fee,coursed as Duration FROM course";
                             ResultSet rs = statement.executeQuery(query);     
                             ResultSetMetaData rmeta = rs.getMetaData();
                             int numColumns=rmeta.getColumnCount();                         
                             for(int i=1;i<=numColumns;i++)
                                  if(i<=numColumns)
                                       defaulttablemodel.addColumn(rmeta.getColumnName(i));
                             while(rs.next())
                                  for(int i=1;i<=numColumns;++i)
                                       if( i<=numColumns)
                                            tempname = rs.getString(i);
                                            tempcnt=i-1;
                                            data[tempcnt] = tempname;          
                                  defaulttablemodel.addRow(data);                              
                   catch(Exception ex)
              printButton.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent ae)
              /*if(ae.getActionCommand().equals("Print"))
              PrinterJob pj = PrinterJob.getPrinterJob();
              pj.setPrintable(cour.this);
              if (pj.printDialog())
              try
              pj.print();
              catch (PrinterException pe)
              System.out.println(pe);
    exitButton.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent ae)
              choice ch=new choice();
                   setVisible(false);
                   ch.setVisible(true);
    setContentPane(panel);
         setSize(1040,780);
    /*Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = getSize();
    int x = (screenSize.width - frameSize.width) / 2;
    int y = (screenSize.height - frameSize.height) / 2;
    setLocation(x, y);*/
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    dispose();
    System.exit(0);
    public int print(Graphics g, PageFormat pf, int pageIndex)
    if (pageIndex != 0) return NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D)g;
    g2.translate(pf.getImageableX(), pf.getImageableY());
    getContentPane().paint(g2);
    return PAGE_EXISTS;
    }

  • How to use activeX viewer with java( CR XI)

    Post Author: jws1624
    CA Forum: JAVA
    Hi
    I could find any sample source or refference about usging activeX viewer and java (CR XI R2 sp3).
    Because of downloading excel(export function), I can't choose JRC viewer . So I think activeX viewer is only way to solve my problem.
    Can anyone let me know how to coding it with jsp? ( there are saveral samples in asp code, but not jsp)

    Post Author: Ted Ueda
    CA Forum: JAVA
    The limitation of not having Excel exports is specific to the Crystal Reports Java Reporting Component, and not with the viewer.ActiveX viewer is supported with the Report Designer Component, which is not Java but COM based - the RDC furthermore is deprecated, and not supported starting with Crystal Reports 2008.  The ActiveX viewer is also supported with Crystal Reports Server and BusinessObjects Enterprise.If you use CR.NET, then Excel export is supported - however, as its name implies, it uses a .NET-based SDK.Sincerely,Ted Ueda 

  • Have a problem using flex ui with Java application

    Hi, I have a built a Flex UI for a java project. The UI has
    some forms which use a servlet for POST and data populated from
    servlet. I have used HTTP service to make the calls. I have built
    my application i.e UI in Flex Builder and when I run my application
    from flex builder everything works fine i.e data populated
    correctly..
    But when I open the projects folder and run the html file
    generated the Http Service does not happen. Can anybody tell me why
    is this so?? . Moreover I want use this UI for my already existing
    java project. So what all files (i,e. html, mxml, swf) will be
    required to be copied to my java project for the UI to work ..
    .Thanks in advance...

    well, that's because Flex Builder is tell Flash player to
    trust stuff in the bin folder:
    http://viconflex.blogspot.com/2008/08/why-no-sandbox-violation-running-from.html
    ATTA

  • How to use transform control in java control?

    when i add a transform control into a java control, the workshop show me :
    The element "jpd:transform" is not allowed at this location
    Is a transform control must be used in a process file?

    Yes, transform controls can only be used from within a process file (JPD).
    The IDE should not let you drop something into a container that doesn't
    support it. That's something that needs to be improved in the next release.
    "Sky" <[email protected]> wrote in message
    news:3f166514$[email protected]..
    >
    when i add a transform control into a java control, the workshop show me :
    The element "jpd:transform" is not allowed at this location
    Is a transform control must be used in a process file?

  • How to use Crystal report with Java

    Dear everyone,
    i am completely new to Crystal report , please can anyone help me to creat a very simple Report using the Crystal report,
    the report will show some records from oracle DB.
    How can i make it by a simple example and with code please?
    do i need any JAR or Bean for Crystal report?
    thanks for your help and please don't hesitate to contact me in case of any inquiries.
    my email: [email protected]
    Thanks in advance

    1. Don't ask people to reply by private email. Most Forum regulars believe solving problems should be a public, transparent process during which a first try at an answer can and should be corrected if someone more knowledgeable notices that it is incomplete or incorrect. Also, they get some of their reward for being respondents from being seen to be competent and knowledgeable by their peers.
    2. Don't flag your question as urgent, even if it is for you. Claiming urgency is very likely to be counter-productive: most forum regulars will simply ignore such messages as rude and selfish attempts to elicit immediate and special attention.
    Besides, unless a legion of ninja lemmings is about to chase you over the edge of a cliff, your problem probably isn't as urgent as you think.
    3. Please make the extra effort to write out words such as "please". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership.
    4. STFW.

  • How to use Enterprise Seriver with java Client

    Hello.
    I'd like to access Enterprise Services that are provided by Test Drive from Java Client.
    Access the Enterprise Services Workplace Systems [original link is broken]
    I've known how to find services and how to test a service.
    I've got .wsdl file.
    But I have no idea that I should do next.
    Let me know how to create proxy from Enterprise Service's wsdl files.
    Thanks,
    Koji.

    Hi Koji,
    You can test your webservices using the software XMLSpy. which you can download from here and its free.
    http://www.altova.com/download/xmlspy/xml_editor_enterprise.html
    Regards
    Sumit Bhutani

Maybe you are looking for

  • Does Time Machine Back Up Windows XP ?

    I have a new MBP arriving shortly. Will use Time Machine with Time Capsule. I Will have a 32 GB Bootcamp partition formatted with FAT32 and with XP SP2 installed. Does Time Machine automatically back up the Bootcamp partition and would I be able to r

  • Installing Oracle Entitlements Server

    hi all, i try to install oracle entitlements server in my pc. but after install everything i can't start Service Control management and i foud the following error log. i believe nothing is using in port 7063. bocz i check with netstat command. ERROR

  • Why is time machine wifi so slow

    I recently switched from my dlink 655 router to the time capsule after hearing such good reviews.  I am finding the wifi very spotty and very slow when connecting to my ps3 and xbox. Is this normal?  Perhaps I don't have things set up properly? Thank

  • Subpixel pdf rendering for evince

    Here is a simple patch for evince to enable sub-pixel rendering of pdf files. First you should replace cairo with either aur/cairo-cleartype or aur/cairo-glitz-cleartype, otherwise you will get ugly color fringes on your glyphs. Then unpack the sourc

  • Naming question

    I am having some trouble with the code I attached below. The "imLoadin" var holds a string that I need for each loop so it will properly load in a buttons graphic. AS3 won't let me use the string to define a movie clip to add a child to. Is there any