Can Java do it?

I am wondering if I can build my GUI using VB.net and then somehow tie that to some java code? Which will reference java methods with a specific jar file? Please give me some ideas.

Sorry guyz but I have been messing with this GridBagLayout and I cannot for the life of me figure it out. Sorry. for some reason this puts the button on the same line as the text fields. Why?
     private static void addComponentsToPane(Container pane)
          GridBagLayout gbl = new GridBagLayout();
          GridBagConstraints gbc = new GridBagConstraints();
          pane.setLayout(gbl);
               //Create Needed components
          String[] labelsText = {     "Transaction Type: ","Service Type: ", "Jurs Code: ", "Amount: "};
          JLabel[] labels = setLables(labelsText);
          String[] inputFieldsText = {"", "", "", ""};
          JTextField[] inputFields = setTextFields(inputFieldsText);
          String[] buttonsText = {"Calculate Taxes"};
          JButton[] buttons = setButtons(buttonsText);
          String[] textAreaText = {""};
          JTextArea[] textArea = setTextArea(textAreaText);
          //Add components
          gbc.anchor = GridBagConstraints.FIRST_LINE_START;
          int i = 0;
          for(int count = 0; count < labels.length; count++){
               gbc.gridx = count+i;
               gbc.gridy = 0;
               pane.add(labels[count],gbc);
               gbc.gridx = count+1+i;
               gbc.gridy = 0;
               pane.add(inputFields[count], gbc);
               i = i+2;
          gbc.anchor = GridBagConstraints.LINE_START;
          gbc.gridx = 2;
          gbc.gridy = 1;
          gbc.gridwidth = 4;
          pane.add(buttons[0]);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Can Java SE run in a Window PE (Preinstallation Environment)

    Hi there,
    Can Java SE run in a Window PE (Preinstallation Environment).
    Thank you for all your help....

    One simple reason is that ME has a lot less core classes than SE. So there is a big possibility that you use something that will not be available on the ME.

  • Can java provide a follow/depend/attatch compiling warning?

    I wrote a class called Query.It connect to database and return ResultSet.So user must manually call my method close() to close the ResultSet and Connection, otherwise resource will be avaliable.
    But user maybe forget call the close() method.If codes are released,problem will occur.
    For this reason I want java provides a compile warning if a important method is not called.
    e.g. Codes maybe like this:
    /**Start**/
    class Query(){
    ResultSet getResultSet(DataSource ds){
    //Codes get resultset
    return ResultSet;
    void close() follow getResultSet(DataSource){
    //Close databse
    //Note: "follow getResultSet(DataSource)" is my idea.
    class test{
    Query query = new Query();
    RsultSet rst = query.getResultSet();
    //query.close();//#1
    /**End**/
    If user forget writing line #1 (to close Database,etc), java compiler will give a warning:
    The method close() must follow method getResultSet!
    You will get error when running.
    Can java provide this function?
    Thanks!

    to mchan0 :
    I konw you mean I can copy ResultSet to another Object.But if databse is very very large,ResultSet will use large memory.It is not we want.
    e.g. our project database need to store 40,000,000 records.Once load large numbers records,server will crack.
    So I can only use ResultSet.
    If I wrong,please correct me.
    Thanks

  • How can java programs execute automatically when it connects to network

    Good Day dears...
    How can java programs execute automatically when it connects to network.
    Thanks in Advance friends Shackir

    884924 wrote:
    Good Day dears...
    How can java programs execute automatically when it connects to network.What is "it"? That is, execute when what connects to the network?
    Your computer? If that's what you mean, this is not a Java question. It's an OS operational/administrative question. Executing any program, whether written in Java or not, based on some system event has to do with that system, not with the program. If it's possible to do this, you'd do it exactly the same way for a Java program as you would for any other program.
    Or is "it" the program itself? If this is what you mean, then it's a nonsensical question. For the program to connect to the network and detect that it has connected to the network, it must already be executing, so asking how to execute it at that point is meaningless.
    Finally, I'll point out that "connecting to the network" is a pretty meaningless phrase. Or rather, it has so many potentially valid meanings that it's impossible to know which one you're referring to when you use that phrase. And I'd be willing to bet you don't have a clear picture of that yourself.

  • Can Java convert text in to three dimensional forms?

    Hi,
    I'm an MA student at Central Saint Martins College of Art and Design in London. I'm currently working on a project to convert text, entered onscreen by users, into three dimensional forms when initiated by clicking on a button. Each 3D form is to be unique to the text entered. Does anyone know how best to do this and whether Java is the best tool for this? Any help or ideas that can be offered will be greatly appreciated.
    Thanks

    Hi,
    Thank you for your help, the link is a great starting point in the development of my project, but its not the "nail on the head", which is my fault. On reading back my last posts it seems I omitted a key word (sorry, my mistake) in the description of what I want to do, which is: "…can Java convert text into abstract three dimensional forms?" By abstract three dimensional forms I was hoping to create something along the lines of what is possible with Rhinoscript, here is an example of the type of visual I want to be able create from the transformation of user entered text using computer code: http://www.theverymany.net/uploaded_images/080108_Srf_Test001_01_k_TVM-718625.jpg. I hope this sheds some light on the direction I'm hoping to take, so if you or anyone else can offer any more help or pointers I will be eternally grateful.
    Thanks

  • Can java have Protected or Private Constructor

    Hi,
    can java have Priavte or protected constructor,
    as we know java have default and public constructor ,
    and in using singleton design patters we can use private & protected constructor,
    so, what is the main logic,
    Regards,
    Prabhat

    Hi,
    Yes, We can declare constructor as private/public/protected also.
    Having only private constructors means that you can't instantiate the class from outside the class (although instances could still be created from within the class - more about this later). However, when you instantiate a class, you must first initialize all superclasses of that class by invoking their constructors. If one of the superclasses has only private constructors declared, we have a problem. We can't invoke the superclass' constructor which means that we can't instantiate our object. Because of this, we've essentially made a class that can't be extended.
    example:
    class TheWorld
    private static TheWorld _instance = null;
    private TheWorld() {}
    public static TheWorld instance()
    if ( _instance == null )
    _instance = new TheWorld();
    return _instance;
    public void spin() {...}
    public class WorldUser
    public static void main(String[] args)
    TheWorld.instance().spin();
    }

  • Can Java save straight to EPS or similar?

    Thanks for reading, heres the setup--user visits my site to design his own custom plaque-he picks a template in my hypothetical Java app and sets to work entering names, congradulatory text and picking from pre-defined graphics/logos and then clicks the ORDER button.
    Can I export his design intact to my server in an EPS or similar, common vector file format? Preferably converting some of the type to curves in the process.
    I don't want to go through a lot of BS to get the file (as with Flash)--I can't run the output through some third party interpreter and get a sorta-kinda-like representation of his design--it's gotta be THE WYSIWYG design he produced. Reason being we're trying to avoid the layout-proof-update roundtrip--what he designed is exactly what we produce and if there are any mistakes they are his, not ours. (It may sound harsh but it's the only way we can possibly compete anymore--we need to offload the design process 100% onto the customer)
    So, can Java do this? Can I get an EPS or similar format straight out of a Java app?
    Thank you.

    http://barcode4j.krysalis.org/
    Next time, go and use Google yourself.

  • Can Java reflect not only .Class file

    Hi' i'm newbie in this topic, i'm really appreciate if somebody can help me..cos i'm really stuck in here...
    My Problems are :
    1. i want to ask about this, can Java reflect from .java file?
    2. i'm using Eclipse IDE, i'm really interesting about how JTree or Package Explorer in Eclipse can always displaying update information about class structure? but .java files not compiled, how can? if Eclipse using reflection, .java files must be compiled first, correct me if i'm wrong?
    The fact is Eclipse don't have to compiled .java files to get the update information about class structure and displaying in JTree or package Explorer...how implement like this?
    what i mean like this :
    ex : if i type int x = 100; (not only int, it could be anything else..) at the working files, JTree or Package Explorer in Eclipse can always update the informasion about class structure, but .java files not compiled..
    i hope my question are easy to understand, i really need some help..
    Thanks a lot..

    hey, thanks for the answers, but i would like to ask :
    1) Eclipse performs background compilation of the Java sources, then performs reflection on those temporary classes++ if i'm using this way, how about the performance? seems that it will be compiled all the time right?
    2) Eclipse has access to the results of the Java source code parser, and can extract the information from the java syntax parser, before it gets to the compilation stage.++ how to implement this? what do you mean about java syntax parser?
    do you know where i can find any article about this?
    thanks a lot again...

  • Can java be a low level programming language??*

    can java be a low level programming language??
    can anyone answer this question and explain it why?
    please please please...�
    [email protected]

    strike one: you are asking an obvious homework type program without showing any evidence of having done any work of your own first. Please show your work first. This isn't a homework service.
    strike two: you are cross posting here and in the "new to java forum". This irritates many of us to no end as we end up doing volunteer work to solve a problem only to find that its already been solved in another thread. So we've wasted our time for nothing. Don't do this.

  • Can java be called as frame work

    I just want to know what is the exact definition of frame work. can java language or any other language can be called as frame works. if so why?
    if not why not? if any one have a clear idea. pls define and help me in having a better idea. thank you.

    Well, I would agree with you conclusion that a language by itself can't be called a framework. If you goal is to improve your communication, I would suggest you make good use of capitalization and use proper English instead of words like "pls".
    *The criticism is meant to be helpful.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can Java evaluate code at runtime ?

    Hi all !
    Can Java evaluate (compile and run on the fly) runtime defined code (as text) ? Like JavaScript does :
    eval("Object1.DoSomething(0);") or eval("a = a +1; b = a;")
    How complex statements are allowed to be evaluated at runtime if so ?
    Thanks !

    Hi all !
    Can Java evaluate (compile and run on the fly) runtime
    defined code (as text) ? Like JavaScript does :No, but maybe BeanShell may be of interest to you:
    http://www.beanshell.org/
    Jesper

  • Can Java program cause memory leak?

    Can Java program cause memory leak or memory crash? I don't mean any memory overflow related exceptions. I mean something like core dump in UNIX or error reports in Windows XP.
    If it can really happen, in what circumstances? I raise such a question because our J2EE based system had really caused memory leak in Windows XP systems, but so far we still fail to troubleshoot the problem.

    Your code may leak memory. There are many, many, many reasons this could be. All of them represent bugs in your code.
    You should get a profiler to identify the problem spots of your code.
    You spoke of a memory crash as well. The VM may crash with some bug in the VM, or a bug in native code but that is not relevent to your problem. A memory leak is a problem in your code.

  • Can java write greek characters to an RTF (Rich Text Format) File???

    Can java write greek characters to an RTF (Rich Text Format) File???

    As far as I'm aware, java can put text in any font to an RTF file as long as that font is available on your machine.

  • Can Java create HTML tables without running a web server?

    Hello,
    I would like to know if Java can output data into a simple HTML-like table without having to run a web server or jsp etc.
    I want my program to access a database and print records in HTML-like table cells.
    It is actually for an events calendar program, where each event would be printed in a cell (date). There would be a variable number of events per cell (date), with each one being editable.
    I have seen various "web" calendars like this but I want to make it a desktop application so that it is not dependant on the functioning (or non-functioning!) of a web server.
    Can Java do this? I would settle for any type of prewritten table creator (not necessarily HTML) but I do not want Excel type tables or a table where entries must be GUI buttons, such as in Outlook.
    Thank you very much for any idea you may have,
    Cat

    Thank you for the replies :)
    I found something with Jeditorpane (JTextComponent and HTML Text Display) at
    http://msp-of.de/oreilly/books/javaenterprise/jfc/ch03_21.htm
    which looks like what I want. It allows hyperlinks within the table cells and I'm not sure if JTable allows for that. Also, I will want multiple lines and even images (eg moon phases for the calendar) in each cell. I ran the example above and it works great. And yes, it makes use of the HyperlinkListener.
    I don't want to create an HTML file for those who suggested that. I just want the flexibility of HTML formatting withing my standalone Java application.
    I am still not sure why everyone is suggesting JTable though :) So I will look at it some more. The link above also has a turorial on JTable and does say its faster that JEditor pane because it doesn't have to do any HTML rendering. But it doesn't look to me like it can really ever look like a calendar.....
    Thank you again! Being a total Java novice, I am very impressed with how easy JEditorpane is.
    Cat

  • What can Java inside cell phone do?

    hello,
    i would like to know what can Java inside my cell phone do? can it:
    1) run in a background
    2) initiate a phone call
    3) send an sms or receive an sms
    4) can it control bluetooth and to what extend
    what are things that java cannot do?
    thank you very much!

    Hi,
    J2ME apps run in sandbox mode. Things can be done using various APIs. To
    answer your specific questions:
    1) depends on the host device implementation, this is not defined by JCP
    2) AFAIK not (due to security). There might be an API however that allows you to
    do this on certain devices.
    3) Yeah, no problem. See http://java.sun.com/products/wma/
    4) Depends on APIs provided by device manufacturer. JCP defined http://www.jcp.org/en/jsr/detail?id=82.
    The things J2ME can not do are mostly features like accessing your phone
    book, use built-in camera (unless APIs are provided), floating point math
    operations, ...
    Reading J2ME related JSRs from http://www.jcp.org/ will give you the overview
    of what's defined and can be expected from all compliant phones. Other
    features may or may not be implemented.
    Hope this helps,
    Peter

  • Can Java execute batch file outside of current JVM in separate process tree

    Hi,
    Does anyone know how to run programs from Java as separate processes that will not die when the spawning java program exits (JVM exits).
    The problem I have with using Runtime.exec is it spawns only child processes under the current running JVM, thus when the origonal program that called Runtime.exec ends so does all child processes.
    Basically I want to start a DOS batch file from my Java application, my Java application will then immediately exit (calling System.exit(0) ). The batch program will continue to run, its does some file clean up, create's some new files and deletes the old jar (containing the main app), it then rebuilds the main app jar and and executes the main class and then exits itself.
    I've also tried the apache.tomcat.jni.Proc :-
    long pool = Pool.create( new Long(0).longValue() );
    long pa = Procattr.create( pool );
    Procattr.dirSet( pa, "c:\\temp\\updater\\");
    Procattr.cmdtypeSet( pa, Proc.APR_SHELLCM );
    Procattr.detachSet( pa, 1 );
    long proc = Proc.alloc( pool );
    Proc.create( proc, "test.bat", new String[]{"test.bat"}, null, pa, pool );
    System.exit(0);
    The detach option doesn't work, if I take it off then the bat file runs and stops the JVM exiting, if I leave it in the batch file never gets called.
    Is this possible in Java. Can java start master process on Windows XP JDK1.5+?
    Cheers
    Chris.

    Well I found the answer elsewhere (java.net) thought I'd post it here for future visitors who might be experience the same problem.
    Basically Runtime can do this however it must be done the following way :-
    The java:-
    public class Main {
        public static void main(String[] args) throws Exception {
            Process p=Runtime.getRuntime().exec("cmd /c c:\\test.bat");
            System.out.println("done");
            System.out.println("quitting");
            System.exit(0);
    }The batch:-
    @echo off
    PING 1.1.1.1 -n 1 -w 5000 >nul
    java -cp "c:\ " MainThe important line that makes the whole thing work is :-
    @echo offIf this line is missing then the whole things locks up (must be the io streams getting used)
    Also this code can not be run from an IDE (well at least not from Intellj) as it also locks up.
    It must be run from a command prompt or jar.
    Also note that any commands in the batch file must have there output redirected to "nul" otherwise Windows kills the cmd as soon as it trys to output to a dead stream (dead because the Java has exited). for example :-
    @echo off
    PING 1.1.1.1 -n 1 -w 10000 >nul
    cd %1
    del /F /Q *.* >nul
    move /Y new\*.* >nul
    RD /Q /S new >nul
    PING 1.1.1.1 -n 1 -w 1000 >nul
    java -cp "c:\ " Main
    exit

Maybe you are looking for

  • Is there a method or app to quickly switch between staff networks in the same building?

    We have a pretty standard network at my job, we have 5 staff networks, Staff A, Staff B, etc. Obviously some networks work better in different parts of the building, but I find that my macbook air tends to hold onto a weaker network and I have click

  • Default value in dropdown field for FPM form in HCM Processes and forms

    Hi Experts, I am developing HCM Processes and forms using FPM forms and I had a dropdown list contains ten values. So, every time while opening the form first time, my dropdown field should be defaulted with fifth value from the list. How can we achi

  • Cannot start Adobe Media Encoder in Adobe Premiere Pro 2.0

    Dear all you guys, I have a problem with adobe media encoder. When i start AME it shows nothing i d't know how to find it. please help me to fix that. Thx so much.

  • Upgrade to Mountain Lion and Exciting Crashes

    I upgraded to Mountain Lion the other week, since I'd been hearing good things about it. Sadly, that seems to have been a MAJOR mistake. I am experiencing two types of crashes that may or may not be linked to Safari or the Finder. Crash Type 1] Milli

  • VGA port problems

    I use an external monitor when in my office with my N100, and for some reason I think the VGA port has gone bad.  I have tried using various monitors and projectors and there seems to be no signal output from the port. Does anyonehave any trouble sho