Creating GUI for JMF

Hello,
In this web page itself there is a coding in the name of cut.java which is used to cut the video files through argument, but i need to create it in the form of GUI format using swings and also i need to provide all the information not in the arguments, it should provided through buttons.........pls someone help me out............
the link to the cut.java: http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/, in this link select cutting section from input.......
Edited by: Arumugaguru on Jan 25, 2010 4:12 AM

You can try somethin like this:
String fichero = "file:/"+jFileChooser2.getSelectedFile().getPath();
String output = "file:/C:\\output\\"+ jFileChooser2.getSelectedFile().getName();
String[] arg={"-o",output, fichero,"-s","5000","-e","1000"};
and then call the main(arg);
The "5000" and "10000" can be replaced by jTextFields (String s=jTextField1.getText();)Edited by: jcesa on Jan 26, 2010 2:01 AM

Similar Messages

  • Error creating GUI for dmardemo.java

    Hi friends!
    I took the demo dmardemo.java (Association Rules) which comes with the ODM for Java to test Data Mining function in the sample database Sales History. In the original code, the application ran normally. However, I'm trying to create a GUI to execute the most important funcionalities like creating view, preparing and building model and restoring rules and itemsets. I created a visual class in the same project where the demo is. I've done some changes in the methods, like putting some input parameters for them. e.g.:
    [i]public static void buildModel(String viewModelo, String configTask, String modelName, String taskName) throws JDMException
    Connecting is ok. However I can not create the view.. When I execute this method for creating the view, some erros occurs, like:
    Create build data view...
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:840)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:759)
         at project1.dmardemo.createBuildData(dmardemo.java:277)
         at project1.Principal.jMenuItem1ActionPerformed(Principal.java:181)
         at project1.Principal$7.actionPerformed(Principal.java:110)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1170)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1211)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    What could be happening?
    Thanks!!
    Regards
    Luis

    I have to tell you that the problem was occurring because of the clean() method. It must clean all views created before, and I was ignoring its execution. Now, another thing is happening: every time I made a call for it, an exception occurs, telling me that I must pass an input parameter for this method, and a null value for the objectName is not allowed.
    However, this method doesn't work with any parameters.
    What could be happening?
    Thanks a lot!
    Luis

  • Help required to create GUI for my portal

    Hi All,
    I have installed weblogic portal 8.1 on my machine. I want to design a page with 2 jsps in one page... Can anyone please tell me how can I do this using weblogic workshop ?
    Thanks in advance...
    dgk

    you are expecting somebody to give you a step by step tutorial or something?
    http://www.amazon.com/exec/obidos/ASIN/059600432X/qid=1116404268/sr=2-1/ref=pd_bbs_b_2_1/102-7768674-5148138
    Or maybe you can find the answer here:
    http://www.manojc.com/
    http://www.webagesolutions.com/knowledgebase/wlskb/

  • Calling SAP GUI for HTML

    Dear Gurus!
    we are facing a peculiar issue. I have created 2 'GUI for HTML' transaction iviews one connecting to 'copy of dev ': ECC:system number x, and the other connecting to 'copy of quality': ECC, System number y.
    Both these ECC systems have same hostname but different system numbers and different system ID's ofcourse.
    When I create GUI for Windows Transaction iview, correct system is opened say transaction 'SMEN'. However when I create GUI for HTML, the Dev ECC system is called nevertheless in both the iviews.
    the behavior is the same even if I test with direct transaction using System Administrator--> support link.
    We are on 7.4 portal with backend ECC 6.
    Please advise
    Regards,
    Ankur Agarwal

    Thanks Pradeep,
    Yes the system objects are fine. there is just one similar entry for both ie the hostname, other wise everything is diff like system num, sys Id, gateway host etc.
    I am still perplexed why on testing, 'GUI HTML' goes to dev only in both cases, while "GUI windows", works fine and goes respectively to dev and qa.
    ANkur

  • Noob creating GUI - The easy way?

    I remember in Visual Basic it was so easy creating GUI, just point and click, drag, etc. Is there any similar utility for creating GUI for java?

    It's worth pointing out that 'click-and-drag' isn't the best way. In Java, components may vary in size between platforms. Even in Swing, components sometimes change slightly in size between releases.
    You should take the time to learn how to use the layout managers - it will pay dividends in the long run. I would strongly recommend against using JBuilder's GUI builder until you know how to do it properly by hand. I use JBuilder to assist in building complicated GUIs, but if you don't understand the fundamentals behind the layout managers, the results are likely to be erratic and frustrating.

  • Creating a GUI for use on an Ethernet Network

    I'm designing a data logger to log voltage, current and temperature data on a reserve battery string while it's being charged. The logger will have the capability to be viewed remotely via Ethernet. With that said, I'd like some advice regarding the GUI for the remote PC which will be used to view the logger. Will it be easier to create the GUI using LabView or another high-level language  (Java, C++ etc)? (Note: I have some programming experience in C (though I've never written/created a GUI) and I've never used LabView).
    Solved!
    Go to Solution.

    Hi Joe1373.  In general, for a small one-off project, I would suggest you go with a language you know.
    In this case it sounds like whatever you choose you will have a learning curve, so I would recommend
    LabVIEW if that is a possibility cost-wise.  LV has a lot of built-in support for GUI development so
    you can make realtively sophisticated GUIs without a whole lot of work/learning.
    There are time-limited evaluation versions of LV available for download.  I would take a look there, especially
    the examples.  Find something a little similar to what you want to do, then change the GUI on the 
    example to more closely match your ultimate objective to get a feel for the GUI development in LV.
    This forum is a great resource with some very helpful developers, so come back with questions.
    There are also many professional developers available to assist if you have a budget or inclination
    towards that direction.
    Matt

  • Creating a Java GUI for a C/C++ program

    I'm tasked with creating a GUI for a multi-threaded C++ network server program that has it's main function running with a while loop that checks for keystrokes from the user. The C++ code for the loop is basically:
    while(i!='q')
    if(kbhit())
    i=getch();
    processkey(i);
    }And the processkey function performs different actions based on the key that was pressed.
    I was reading up on ways to interface between Java and C/C++ and heard of JNI, but I also found someone who suggested using the Java Robot class to send the keystrokes from my GUI to the C++ program.
    I've been trying to make a small test case application using the Robot class before trying to implement it in my larger project.
    I created a program with a JFrame with two buttons, one starts a simple C++ program that loops, waiting for keypresses and which will close when 'q' is pressed, like my main program.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            try {
                Runtime.getRuntime().exec("C:/Users/Administrator1/Desktop/Untitled2.exe");
                // TODO add your handling code here:
            } catch (IOException ex) {
                Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
            // TODO add your handling code here:
        }The other button creates a Robot instance and tells that robot to send a key press of 'q', which should terminate the C++ program.
    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
            try {
                Robot robot = new Robot();
                // Creates the delay of 5 sec so that you can open notepad before
                // Robot start writting
                //robot.delay(5000);
                robot.keyPress(KeyEvent.VK_Q);
            } catch (AWTException e) {
                e.printStackTrace();
        }It isn't working though. Could it be because when the program is started from my Java app, it runs in the background rather than opening in a new command prompt window? Or is Robot not the way to go, and if so, are there any examples and/or tutorials online that could help me?

    When you clicked the button, what application do you think has the focus at that point? So what do you think consumes the keystroke that you emulated? Hint: It wouldn't be the application you intended it to go to.

  • Creating GUI's for simulators.

    Hey all,
    I am VERY new to Java. Can anyone point me in a direction to get more information on creating GUI's for simulators?
    Thanks in advance.

    Encephalopathic wrote:
    overrule wrote:
    Would your advice be extended to Jesus? I mean that he learn how to crawl before he tried to walk on water?I haven't learned that prog language.It's more about IQ isn't it, but okay, I'll give it to you in easily understandable terms - if you're dumb shut up.

  • Wanna create a gui for an app

    greetz!
    i wanna create a little gui for a commandline app. never done this before. does any1 know about some howto's online? i don't know much about these things at the moment, but i gotta start somewhere, and i'm not afraid to read and spend some time. things that cross my mind when thinking about creating a gui are python, c, gtk,...
    any help, advice, links are very welcome! 
    thanks in advance!

    These should be helpful:
    http://java.sun.com/docs/books/tutorial … index.html
    http://java.sun.com/docs/books/tutorial … index.html
    Basically, you start with a static main method, create a JFrame extension from in it, create the display, add events for buttons and components. To interface with a commandline app, you can use Runtime.getRuntime().exec(); take a look at the java api (under java.lang) for the various versions of the exec method.
    You can e-mail me directly (dusty at buchuki.com) if you have questions, though for professional style advice, the forums at java.sun.com might be more effective (though perhaps not so friendly :-D)
    Dusty

  • Somewhat new to Java -- Given the task to create a GUI for a test.

    Hello there, I am a freshman student, in a Java class; the semester is coming to an end. In our project, we were assigned three parts to complete a program, that basically hands out a test. [I believe someone else has asked questions about a similar problem before, but not towards my situation.]
    The topic I chose to work with was the GUI for the program,and I'm already hitting snags. The issue is..well, probably the fact I get sort of lost when it comes to calling other methods, or just stupid mistakes to begin with. Some of the options we're faced with that we can put into the program are, for example, creating back/next buttons so the user can scroll through given questions, a progress meter [which I have no idea how to go about], Add an answer sheet in a separate window, and some others, but if possible, I will get to those when the time is right.
    Also, a small note about the majority of the code; Most of it is from a mold that was given to us as an example in class, and the 'setUp' method came from another class. [QuizDriver] As of now, the code remains untouched, but the if loops that remain empty or rather messed up is my fault, as I hit a snag and..to be honest, I am quite lost.
    As of now, my code for the GUI is this.
    import javax.swing.*;     
    import java.awt.*;     
    import java.awt.event.*;
    public class ProjGUI implements ActionListener {     
         // class constants      
         private static final int WINDOW_WIDTH = 700; 
         private static final int WINDOW_HEIGHT = 200; 
         private static final int TEXT_WIDTH = 50;   
         private static final FlowLayout LAYOUT_STYLE =     
              new FlowLayout();          
         static Test exam = new Test("Sample Exam", "Select the correct answer for each question");
         private JFrame window = new JFrame("Project GUI: Test");     
         private JTextArea results = new JTextArea("");
         int counter;
         private JLabel QTag = new JLabel("The Current Question:");     
         private JTextField QText = new JTextField(exam.displayQuestion(0));     
         private JLabel AnsTag = new JLabel("Your Answer:");
         private JTextField AnsText = new JTextField(TEXT_WIDTH);     
         private JButton SubButton = new JButton("Submit");     
         private JButton backButton = new JButton("Back");
         private JButton advButton = new JButton("Next");
         private JButton clearButton = new JButton("Reset Answer Choice");
         // constructor      
         public ProjGUI()
              // configure GUI      
              window.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);     
              window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     
              QText.setEditable(false);     
              QText.setBackground(Color.WHITE);     
              // register event listener      
              SubButton.addActionListener(this);     
              clearButton.addActionListener(this);
              backButton.addActionListener(this);
              advButton.addActionListener(this);
              // arrange components in GUI      
              window.getContentPane().setLayout(LAYOUT_STYLE);     
              window.getContentPane().add(QTag);     
              window.getContentPane().add(QText);     
              window.getContentPane().add(AnsTag);     
              window.getContentPane().add(AnsText);     
              window.getContentPane().add(SubButton);     
              window.getContentPane().add(backButton);
              window.getContentPane().add(clearButton);
              window.getContentPane().add(advButton);
              // display GUI      
              window.setVisible(true);     
         // actionPerformed(): run button action event handler
         public void actionPerformed(ActionEvent e) {     
              if (e.getActionCommand().equals("Submit"))
                   if(QText.equals(""))
                        QText = null;
                   if(e.getActionCommand().equals("Back"))
                        // Code for going back through the questions.
                   if(e.getActionCommand().equals("Next"))
                        // Code for advancing through the test
              // exam.answer(counter, ans);
              QText.setText(exam.displayQuestion(0+1));
              if (counter == exam.length())
                 exam.scoreExam(true);
                 results.setText("Your final score was " + exam.getScore() + "/" + exam.getMaxScore() + " points.");
                 results.setVisible(true);
              counter++;
         // main(): application entry point     
         public static void main(String[] args)
              setUp(exam);
              ProjGUI gui = new ProjGUI();     
         private static void setUp (Test t)
              TrueFalseQuestion x = new TrueFalseQuestion("The sky is blue.", "true", 2);
              t.addQuestion(x);
              x = new TrueFalseQuestion("The first FORTRAN compiler debuted in 1957", "true", 5);
              t.addQuestion(x);
              MultipleChoiceQuestion m = new MultipleChoiceQuestion("Which of the following is NOT a disk-scheduling algorithm?", "b", 4);
              m.addAnswerChoice("SSTF");
              m.addAnswerChoice("SJF");
              m.addAnswerChoice("FCFS");
              m.addAnswerChoice("All of the above are disk-scheduling algorithms");
              t.addQuestion(m);
               x = new TrueFalseQuestion("Spock was a Vulcan", "false", 3);
              t.addQuestion(x);
    }Feel free to tear it apart, as I am doing trying to figure out how exactly the buttons should work. Any feedback is appreciated.
    Edited by: Ereki on May 15, 2008 11:03 PM
    Edited by: Ereki on May 15, 2008 11:07 PM

    You may find java.awt.CardLayout and javax.swing.JProgressBar helpful.
    Generally if you have Swing-specific questions, you should ask on the Swing forum.

  • Can you play this url? (JMF error 'could not create player for')

    Hello,
    I can play this url in Windows Media Player
    http://anon.vht.com.edgesuite.net/dl/deg18-062405-2425.wmv
    However when I try to play it in JMStudio 2.1.1e, I get error "could not create player for deg18-062405-2425.wmv"
    Any help appreciated,
    thanks,
    Anil

    please login and vote for this bug to be fixed - 4 years old!!!
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670412

  • How to create statistics for INDEX thru GUI

    In DB13 i see messages MISSING_STATISTICS for some indexes.
    I manage for tables thru DB20. How can i create statistsics for INDEX.
    Rgds
    PR

    Hello PR,
    at first let's say you should use the BRTools to create statistics for the indexes, because of the sample method (estimate, compute) - SAP has an algorithm to choose the right sample size.
    Have a look at here:
    http://help.sap.com/saphelp_nw70/helpdata/en/f4/81e93a637bfd70e10000000a11402f/content.htm
    If you want to create statistics manually out of the R/3 ... you can use the report "RSANAORA"
    Transaction SE38 -> Report RSANAORA -> Choose your index and sample method... and go on.
    Regards
    Stefan

  • How to create transaction for a maintenance view, Thank you.

    How to create transaction for a maintenance view,
    Thank you.
    deniz...

    Hi Deniz,
    Go to se93.
    Then create the new T.code.
    Under that select parameter Transaction.
    Then give the sm30 in the t.code in default values tab.
    check the checkbox skip initial screen.
    in classification tab.
    click checkbox inherit gui attributes..
    Now below..
    In the default values..
    select
    viewname and give ur table name.
    UPDATE= Xsave
    view - table name ( Should be upper case
    update X ( should be upper case).
    http://www.sap-basis-abap.com/sapbs011.htm
    Hope this helps you.
    Regards,
    Viveks

  • In case of problems with SAP GUI for Java  ...

    Hello all,
    in case of having problems (errors, ABAP dumps etc.) with SAP GUI for Java, please create an OSS message on component BC-FES-JAV with information described in OSS note 326558
    http://www.service.sap.com/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700010521522001.
    This makes sure our official support channels get aware of your problem.
    Thanks and best regards
    Rolf-Martin

    Hello Rolf-Martin,
    i don't have access to this website to view the note.
    The version of the Suse libc is:
    GNU C Library stable release version 2.3.2, by Roland McGrath et al.
    Copyright (C) 2003 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE.
    Compiled by GNU CC version 3.3 20030226 (prerelease) (SuSE Linux).
    Compiled on a Linux 2.4.20 system on 2003-03-13.
    Best Regards,
    Piotr Brostovski

  • ANN: SAP GUI for Java 7.00 rev 5 available for download

    Hi all,
    SAP GUI for Java 7.00 rev 5 is now available at <b>http://service.sap.com/sapgui-java</b>.
    In case you are not registered on service.sap.com, you can alternatively download it from ftp://ftp.sap.com/pub/sapgui/java/700r5.
    This revision solves issues in the dropdown listbox, grid and table control. Also an issue with FileDownload is fixed. For more information, please refer to the release notes.
    <a href="https://service.sap.com/sap/support/notes/954572">Note 954572</a> lists the supported platforms.
    Best regards
    Rolf-Martin

    hi Mr.Rolf-Martin,
       this is kumar writing in regards with the sap gui for java 7.00 rev 4.....i found ur link very helpful ....thanks for the link...and i have a problem in creating a new connectioin ....i have gone thru some of the forum replies and pdf's ....but i could not set up the new connection ....
    can u plz help me in creating a new connection .....
    the rev4.jar file was successfully installed.....
    and whats are the next steps .....
    any help appriciated thanks
    regards
    kumar

Maybe you are looking for

  • Problem with SOAP 1.1 Format

    Hello everyone. I am use SAP XI SOAP 1.1 with WS-Security. At the end of the header of the message the tag <wsse:BinarySecurityToken> is repeating twice which causes a problem from the other receiving SOAP adapter (webMethods). Anyone knows how to fi

  • SelectBooleanCheckbox in Map or Array?

    Hi guys, Anybody has example on putting selectBooleanCheckbox in a Map/Array in backing bean so that in JSP page we don't need to put it like 1 by 1. For example, if I got a list of 5 facilities for selectBooleanCheckbox, I don't need to do it like t

  • Using apple ID and itune cards

    Can you create an Apple ID with out putting in a physical address and will it work with itunes and pre paid itunes cards and free stuff at apps store.

  • FM for checking Tranport Request.

    Hi gurus, Transport Request numbers are stored in Table E070, it also stores if Request is Customizing request/Correction Request. I want to know if there is any existing FM to get this information regarding a TR. As it is, i think accessing a Basis

  • Oranfstab syntax/format rules?

    In oranfstab, is the rule to have at most one local per path, and local always listed first? We had an issue where it seems a change to the oranfstab was preventing database from starting up, so we just renamed it out of the way for now. I haven't fo