Tutorial search for JMF

can u tell me were i can a find a tutorial that tells me how to write a simple mp3 player in JAVA
and any kind of text from whitch i can learn JMF
thanx.

Deitel Java How to Program 4th edition has a section on JMF
You might be better off looking at the JMF Solutions
http://java.sun.com/products/java-media/jmf/2.1.1/solutions/
or some sample code/tutorial
http://java.sun.com/products/java-media/jmf/2.1.1/samples/samplecode.html
or try this
import javax.media.bean.playerbean.MediaPlayer;
MediaPlayer1 = new javax.media.bean.playerbean.MediaPlayer();
// Set the media location
MediaPlayer1.setMediaLocation(new java.lang.String("file:///E:/jvideo/media/Sample1.mp3"));
MediaPlayer1.start();
MediaPlayer1.stop();

Similar Messages

  • Direction/tutorial search for Pop up menus

    I need to learn how to do sub menus on a vertical navigation
    bar and I don't know where to start as the books I have do not go
    into that. If someone could direct me to a tutorial, or where I can
    find tutorials, that would be great.
    thank you!

    "redstonegirl" <[email protected]> wrote in
    message
    news:eo0dfm$k4r$[email protected]..
    > I'm new to this, and I'm wondering if it is suggested to
    use this drop
    > down for a side menu bar. I am considering doing this
    but my menu must be
    > on the side.
    Yes, once you master the tutorial on creating these type of
    menus, you can
    have them as dropdowns, or flyouts (as they are commonly
    called when
    attached to a vertical menu system).
    Nadia
    Adobe® Community Expert : Dreamweaver
    Tutorials |SEO |Templates
    http://www.DreamweaverResources.com
    http://www.perrelink.com.au
    CSS Tutorials for Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/css.html

  • Searching for simple bluetooth to bluetooth messages tutorial or example

    Hi,
    I want to send messages from 1 mobile phone to another one using Bluetooth but I can't find any simple tutorial or example with this type of bluetooth use.
    So i'm asking for your help :) any simple tutorial/example for bluetooth messages between devices?
    Thanks in advance

    import java.util.Vector;
    import java.io.IOException;
    import javax.microedition.io.Connector;
    import javax.microedition.io.ConnectionNotFoundException;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.TextField;
    import javax.microedition.lcdui.StringItem;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.ChoiceGroup;
    import javax.microedition.lcdui.Choice;
    import javax.bluetooth.LocalDevice;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.DiscoveryAgent;
    import javax.bluetooth.DataElement;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.UUID;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.ServiceRecord;
    import javax.bluetooth.L2CAPConnectionNotifier;
    import javax.bluetooth.L2CAPConnection;
    import javax.bluetooth.BluetoothStateException;
    import javax.bluetooth.BluetoothConnectionException;
    import javax.bluetooth.ServiceRegistrationException;
    public class ChatController extends MIDlet implements CommandListener
    private Display display = null;
    private Form mainForm = null;
    private ChoiceGroup devices = null;
    private TextField inTxt = null;
    private TextField outTxt = null;
    private Command exit = null;
    private Command start = null;
    private Command connect = null;
    private Command send = null;
    private Command select = null;
    private StringItem status = null;
    private LocalDevice local = null;
    private RemoteDevice rDevices[];
    private ServiceRecord service = null;
    private DiscoveryAgent agent = null;
    private L2CAPConnectionNotifier notifier;
    private L2CAPConnection connection = null;
    private static final String UUID_STRING = "112233445566778899AABBCCDDEEFF";
    private boolean running = false;
    public ChatController()
    super();
    display = Display.getDisplay(this);
         mainForm = new Form("CHAT");
         devices = new ChoiceGroup(null,Choice.EXCLUSIVE);
         inTxt = new TextField("incoming msg:","",256,TextField.ANY);
         outTxt = new TextField("outgoing msg:","",256,TextField.ANY);
         exit = new Command("EXIT",Command.EXIT,1);
         start = new Command("START",Command.SCREEN,2);
         connect = new Command("CONNECT",Command.SCREEN,2);
         send = new Command("SEND",Command.SCREEN,2);
         select = new Command("SELECT",Command.SCREEN,2);
         status = new StringItem("status : ",null);
         mainForm.append(status);
         mainForm.addCommand(exit);
         mainForm.setCommandListener(this);
    protected void startApp() throws MIDletStateChangeException
    running = true;
         mainForm.addCommand(start);
    mainForm.addCommand(connect);
         display.setCurrent(mainForm);
    try
    local = LocalDevice.getLocalDevice();
         agent = local.getDiscoveryAgent();
    catch(BluetoothStateException bse)
    status.setText("BluetoothStateException unable to start:"+bse.getMessage());
              try
              Thread.sleep(1000);     
              catch(InterruptedException ie)
    notifyDestroyed();
    protected void pauseApp()
    running = false;
         releaseResources();
    protected void destroyApp(boolean uncond) throws MIDletStateChangeException
    running = false;
         releaseResources();
    public void commandAction(Command cmd,Displayable disp)
    if(cmd==exit)
         running = false;
              releaseResources();
              notifyDestroyed();
    else if(cmd==start)
         new Thread()
                   public void run()
                        startServer();
                   }.start();
    else if(cmd==connect)
              status.setText("searching for devices...");
                        mainForm.removeCommand(connect);
                        mainForm.removeCommand(start);
                        mainForm.append(devices);
                        DeviceDiscoverer discoverer = new DeviceDiscoverer(ChatController.this);
                        try
                             agent.startInquiry(DiscoveryAgent.GIAC,discoverer);
                        catch(IllegalArgumentException iae)
    status.setText("BluetoothStateException :"+iae.getMessage());
                        catch(NullPointerException npe)
    status.setText("BluetoothStateException :"+npe.getMessage());
                        catch(BluetoothStateException bse1)
    status.setText("BluetoothStateException :"+bse1.getMessage());
    else if(cmd==select)
                        status.setText("searching devices for service...");
                             int index = devices.getSelectedIndex();
                             mainForm.delete(mainForm.size()-1);//deletes choiceGroup
                             mainForm.removeCommand(select);
                             ServiceDiscoverer serviceDListener = new ServiceDiscoverer(ChatController.this);
                             int attrSet[] = {0x0100}; //returns service name attribute
    UUID[] uuidSet = {new UUID(UUID_STRING,false)};
                             try
                                  agent.searchServices(attrSet,uuidSet,rDevices[index],serviceDListener);
                             catch(IllegalArgumentException iae1)
    status.setText("BluetoothStateException :"+iae1.getMessage());
                        catch(NullPointerException npe1)
    status.setText("BluetoothStateException :"+npe1.getMessage());
                        catch(BluetoothStateException bse11)
    status.setText("BluetoothStateException :"+bse11.getMessage());
    else if(cmd==send)
                             new Thread()
                                       public void run()
                                            sendMessage();
                                       }.start();
    //this method is called from DeviceDiscoverer when device inquiry finishes
    public void deviceInquiryFinished(RemoteDevice[] rDevices,String message)
    this.rDevices = rDevices;
         String deviceNames[] = new String[rDevices.length];
         for(int k=0;k<rDevices.length;k++)
         try
              deviceNames[k] = rDevices[k].getFriendlyName(false);
         catch(IOException ioe)
         status.setText("IOException :"+ioe.getMessage());
    for(int l=0;l<deviceNames.length;l++)
         devices.append(deviceNames[l],null);
    mainForm.addCommand(select);
         status.setText(message);
    //called by ServiceDiscoverer when service search gets completed
    public void serviceSearchFinished(ServiceRecord service,String message)
         String url = "";
    this.service = service;
         status.setText(message);
         try
         url = service.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT,false);     
         catch (IllegalArgumentException iae1)
    try
         connection = (L2CAPConnection)Connector.open(url);
              status.setText("connected...");
              new Thread()
              public void run()
                   startReciever();
              }.start();
    catch(IOException ioe1)
    status.setText("IOException :"+ioe1.getMessage());
    // this method starts L2CAPConnection chat server from server mode
    public void startServer()
    status.setText("server starting...");
         mainForm.removeCommand(connect);
         mainForm.removeCommand(start);
         try
              local.setDiscoverable(DiscoveryAgent.GIAC);
              notifier = (L2CAPConnectionNotifier)Connector.open("btl2cap://localhost:"+UUID_STRING+";name=L2CAPChat");
              ServiceRecord record = local.getRecord(notifier);
              String conURL = record.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT,false);
              status.setText("server running...");
              connection = notifier.acceptAndOpen();
              new Thread()
              public void run()
                   startReciever();
              }.start();
         catch(IOException ioe3)
    status.setText("IOException :"+ioe3.getMessage());
    //starts a message reciever listening for incomming message
    public void startReciever()
    mainForm.addCommand(send);
    mainForm.append(inTxt);
         mainForm.append(outTxt);
         while(running)
         try
              if(connection.ready())
                   int receiveMTU = connection.getReceiveMTU();
                        byte[] data = new byte[receiveMTU];
                        int length = connection.receive(data);
                        String message = new String(data,0,length);
                        inTxt.setString(message);
         catch(IOException ioe4)
         status.setText("IOException :"+ioe4.getMessage());
    //sends a message over L2CAP
    public void sendMessage()
    try
         String message = outTxt.getString();
              byte[] data = message.getBytes();
              int transmitMTU = connection.getTransmitMTU();
              if(data.length <= transmitMTU)
              connection.send(data);
    else
              status.setText("message ....");
    catch (IOException ioe5)
    status.setText("IOException :"+ioe5.getMessage());
    //closes L2CAP connection
    public void releaseResources()
    try
         if(connection != null)
                   connection.close();
              if(notifier != null)
                   notifier.close();
    catch(IOException ioe6)
    status.setText("IOException :"+ioe6.getMessage());
    import java.util.Vector;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.ServiceRecord;
    public class DeviceDiscoverer implements DiscoveryListener
    private ChatController controller = null;
    private Vector devices = null;
    private RemoteDevice[] rDevices = null;
    public DeviceDiscoverer(ChatController controller)
    super();
    this.controller = controller;
         devices = new Vector();
    public void deviceDiscovered(RemoteDevice remote,DeviceClass dClass)
    devices.addElement(remote);
    public void inquiryCompleted(int descType)
         String message = "";
    switch(descType)
         case DiscoveryListener.INQUIRY_COMPLETED:
                   message = "INQUIRY_COMPLETED";
              break;
         case DiscoveryListener.INQUIRY_TERMINATED:
                   message = "INQUIRY_TERMINATED";
              break;
         case DiscoveryListener.INQUIRY_ERROR:
                   message = "INQUIRY_ERROR";
              break;
    rDevices = new RemoteDevice[devices.size()];
         for(int i=0;i<devices.size();i++)
              rDevices[i] = (RemoteDevice)devices.elementAt(i);
         controller.deviceInquiryFinished(rDevices,message);//call of a method from ChatController class
         devices.removeAllElements();
         controller = null;
    devices = null;
    public void servicesDiscovered(int transId,ServiceRecord[] services)
    public void serviceSearchCompleted(int transId,int respCode)
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.DataElement;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.ServiceRecord;
    public class ServiceDiscoverer implements DiscoveryListener
    private static final String SERVICE_NAME = "L2CAPChat";
    private ChatController controller = null;
    private ServiceRecord service = null;
    public ServiceDiscoverer(ChatController controller)
    super();
         this.controller = controller;
    public void deviceDiscovered(RemoteDevice remote,DeviceClass dClass)
    public void inquiryCompleted(int descType)
    public void servicesDiscovered(int transId,ServiceRecord[] services)
    for(int j=0;j<services.length;j++)
         DataElement dataElementName = services[j].getAttributeValue(0x0100);
              String serviceName = (String)dataElementName.getValue();
              if(serviceName.equals(SERVICE_NAME))
                   service = services[j];
              break;     
    public void serviceSearchCompleted(int transId,int respCode)
    String message = "";
         switch(respCode)
         case DiscoveryListener.SERVICE_SEARCH_COMPLETED:
                   message = "SERVICE_SEARCH_COMPLETED";
              break;
         case DiscoveryListener.SERVICE_SEARCH_ERROR:
                   message = "SERVICE_SEARCH_ERROR";
              break;
         case DiscoveryListener.SERVICE_SEARCH_TERMINATED:
                   message = "SERVICE_SEARCH_TERMINATED";
              break;
         case DiscoveryListener.SERVICE_SEARCH_NO_RECORDS:
                   message = "SERVICE_SEARCH_NO_RECORDS";
              break;
         case DiscoveryListener.SERVICE_SEARCH_DEVICE_NOT_REACHABLE:
                   message = "SERVICE_SEARCH_DEVICE_NOT_REACHABLE";
              break;
         controller.serviceSearchFinished(service,message);//calling a method from ChatController class
    controller = null;
         service = null;
    }

  • How to search for a text node with a particular value in an xml document with labview

    supposing i have the following xml document:
    <head>
    <book>
    <bookname>zio</bookname>
    <author>dan</author>
    </book>
    <book>
    <bookname>the spear warrior</bookname>
    <author>britney</author>
    </book>
    <book>
    <bookname>the beard</bookname>
    <author>derrick</author>
    </book>
    </head>
    i want to search for the author of the book "the beard" using for example the V.I Get first match  of labview to access the the node with value "the beard" and then use Get next sibling  V.I  and Get node text content to get get the author of this book..so my question is how do i write the xpath expression for Get first match so as to access the node with bookname "the beard" instantyly?  am trying to minimise the use of loops because they increase the time duration,..thank you (NB:i dont want to use Get all Matched V.I because it obliges me to use a loop in order to access the name derrick and this increases the time duration for my v.i)
    Solved!
    Go to Solution.

    Since it's all text, why not use a real quick Match Pattern (or Regular Expression, but you don't need that much power here), see attached.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ
    Attachments:
    Two-stage match demo.vi ‏8 KB

  • How to search for a variety of characters

    I am working on a document wherein a script I ran has applied differential results to page indicators. I am trying to ensure that I have easy accessibility to indexing in an e-book format, and so I am doing the following:
    1.) Inserting notes at physical page breaks in the print layout in InDesign
    2.) making those notes visible
    3.) applying the "page" style to them, which I have set to display hidden in my CSS but will allow me to insert anchor points for a hyperlink index
    The problem is the note shows up differentially. Some say:
    {~?~PG: @##@} while others show {~?~PG: %##%} where ## represents some page number. The @##@ received the page style properly, but not the %#%. What would be the GREP approach to searching for every instance of {~?~PG: %##%} and applying the page style to it?
    I know how to make sure that the page style is applied. I know that I'd use (\d+) for the numbers. I don't know hwo to represent the brackets, tildes, question marks, or other characters. Is there a good reference for this somewhere or perhaps a tutorial? I hate to bug the forum community with it. I just don't know where to go to get the info I need.
    Edit: To be clear, I'm trying to search for the string
    {~?~PG: %##%}
    All of the characters in the string are the same each time, but the numbers are sequentially higher and higher. There are hundreds of these in my document, so replacing each manually is taking a long time. Thanks for any feedback.
    Edit #2: After a lot of trial and error, I nailed it. This worked for me:
    \{(.+)\%(\d+)\%.
    I left the "change to" blank and in the big Change Format window, I added character style "page", though of course this is going to be different for you depending on how you have the name of that style set up in your CSS file if you're making an e-book too. : )
    Message was edited by: 1John5vs7

    You should definitely look into full-text search. The idea that Kalman floated is doable, but it require a lot more work on your part. Full-text does a lot work for you, for instance handling inflections, so that a search on "goose" will get a
    hit on "geese".
    If you have never worked with full-text search before, I recommend to get your hands on this book:
    http://www.sqlservermvpdeepdives.com/
    http://www.amazon.com/SQL-Server-MVP-Deep-Dives/dp/1935182048/ref=sr_1_1?ie=UTF8&qid=1400851023&sr=8-1&keywords=sql+server+mvp+deep+dives
    This book is a collection of chapters written by a number of SQL Server MVPs, and all our royalties goes to War Child International, so you are supporting a good aim if you buy this book.
    Chapter 13 by Robert Cain is an excellent introduction to full-text search, although it does not handle Semantic Search added in SQL 2012.
    As it happens, my chapter, describes a solution of what Kalman had in mind, although it aimed for the case where you want to permit users to search arbitrary character sequence, and that is not want you want.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Searching for Flash Photo Gallery with numbered navigation menu.

    I'm looking for a photo gallery with a numbered navigation
    menu. I've seen this gallery on several flash web pages. Is this
    type of photo gallery a template that comes with flash? Has anyone
    come across a tutorial for a photo gallery similar to the link
    below.
    http://www.rockcreeksm.com/index.php/work/portfolio/

    i made this one:
    http://www.goldbergphotography.com/
    but there are quite a few simpler photogalleries. use google
    to search for some tutorials or templates.

  • Can't find my iweb domain file when searching for it in iweb seo tool

    I am trying to get my iweb website recognized by Google. Can't seem to get the google html code to work in html snippet. So am now trying to use the iweb seo tool but can't find my iweb domain file when searching for it in iweb seo tool. My file is in user/library/applicationsupport/iweb/name.sites2
    It shows in the folder but is not active, so I can't choose it.

    The SEO ftp client is not what I'd recommend using. Once you add the metadata to a local copy of the files use a 3rd party ftp client like the free Cyberduck to upload the files. Much more reliable.
    Google does not use keywords for it's searches although other search engines do. Create a test page on your site (leave it out of the navbar) and try adding Google Analytics to it with Wyodor's instructions. If you get it to work then all you need to do is copy and paste the HTML snippet from the test page into your site pages.
    For information on visitors to your site you can also use StatCounter. It records the number of visitors and a lot more: where they are from, what browser used, which page visited and what site/page then came from for just a few. SC is easy to add to the pages as you get the code for your account, put it in an HTML snippet add the snippet to each page. Old Toad's Tutorial #13 - Adding a StatCounter as an HTML Snippet describes how to do it.
    Again use a test page or a separate test site to work out the details before adding to your site pages.

  • Calculators and  Searches for Real Estate Web Site

    I have a friend who has asked if I can make a real estate page for them them using my iWeb '08 program.
    I've never done anything like mortgage calculators and home/msl searches. Does anyone know how to do these things, web sites that help with this, or is it even possible?
    Any advise, tutorials, links, anything would be greatly appreciated. Thanks all.

    There are plenty of free mortgage calculators you can add to a website....
    http://www.widgetbox.com/search?q=loan+calculator
    http://www.calculators4mortgages.com/calculators/loan/amortization_schedule.html
    Your friend should have access to the MLS through their Realtor Association.
    When my wife was involved in real estate in Northern California acting as a buyers agent for investors I used this site for research....
    http://www.greathomes.org/
    I'm sure you'll find other sites like this for other areas.
    A realtor doesn't allow clients to search for homes - that's their job.
    The best thing to have on a site like this is a form that potential clients can fill in with all the details of their requirements.
    Wufoo has a mortgage application form which I modified for collecting home buyer information. Don't ask me how I did it because it was about two years ago!
    As long as you are publishing to a hosting company that allows you to run scripts, you can build your own forms. Tutorial....
    http://www.w3schools.com/html/html_forms.asp

  • Search for string and move decimal

    Hello,
    I am trying to write code that will search for a fractional string within an array and convert it from mV to V so it can be properly compared to the other fractional string numbers in the array.
    I have an array that outputs x iterations  each with a minimum and maximum column including several different types of decimal strings (negative/positive with several decimal places) each ending with either mV and V (example string: -725.543mV).
    I then split the array into columns containing the minumum and maximum values of each iteration. I want to compare the minimum values of each iteration and find the most minimum, and do the same thing with the maximum values.
    Unfortunatley the way I'm doing it, when I convert from fractional string to number it removes the V or mV unit label but does not convert the number from mV to V. so it compares -725.543mV with -52.334V as -725.543 & -52.334 thus declaring the mV value the most minimum. I need the program to recognize that mV is less than V or search each array for values labeled with mV and move the decimal place so it is in standard V format.
    The unit label is actually part of the string and not the display (as you can see in the code I've attached) and I understand this is a little tricky with the way I have to do it. But this is a dumbed down chunk of code I will eventually incorporate into my larger program which reads the values and their units from several different types of oscilloscopes. The Scopes output the values as strings as they appear on the screen and don't differentiate between mV and V unless they are told to output the units which just tags them on the end of the string.
    I'm sorry for the large post. SO to sum up I need to search an array to make sure all values have the same units, if they don't I need to convert each value to the proper unit and output the max and min from the resulting array. my code is attached. Thank you for your help.
    Solved!
    Go to Solution.
    Attachments:
    File manipulation.vi ‏15 KB

    crossrulz wrote:
    jcarmody wrote:
    camerond wrote:
    Sorry, Jim, that's not quite right. You forgot to consider significant figures (your third min is not quite right). [...]
    Good catch, but, really?   
    That "Finally!" comes out to -5569492V to me.  Holy crap.  -5.569492MV!  I think there's a problem there.
    Carp! Stupid negative numbers, shouldn't be allowed. Put a piece of duck tape over the place for that negative sign, that'll fix it.
    I'll get back, it's now a matter of principle.
    Jim, how does your algorithm do when there are 8 or 9 sig figs, say -56.9492345mV? (Yep, too lazy to draw it in myself.)
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Searching for a substring using Regular Expression

    I have a lengthy String similar to repetetion of the one below
    String str="<option value='116813070'>Something1</option><option value='ABCDEF' selected>Something 2</option>"I need to search for the Sub string "<option value='ABCDEF' selected>" (need to get the starting index of sub string) and but the value ABCDEF can be anything numberic with varying length.
    Is there any way i can do it using regular expressions(I have no other options than regular expression)?
    thanks in advance.

    If you go through the tutorial then you will find this on the second page:
    import java.io.Console;
    import java.util.regex.Pattern;
    import java.util.regex.Matcher;
    public class RegexTestHarness {
        public static void main(String[] args){
            Console console = System.console();
            if (console == null) {
                System.err.println("No console.");
                System.exit(1);
            while (true) {
                Pattern pattern =
                Pattern.compile(console.readLine("%nEnter your regex: "));
                Matcher matcher =
                pattern.matcher(console.readLine("Enter input string to search: "));
                boolean found = false;
                while (matcher.find()) {
                    console.format("I found the text \"%s\" starting at " +
                       "index %d and ending at index %d.%n",
                        matcher.group(), matcher.start(), matcher.end());
                    found = true;
                if(!found){
                    console.format("No match found.%n");
    }It's does everything you need and a bit more. Adapt it to your needs then write a regular expression. Then if you have problems by all means come back and post them up here, but first at least attempt to solve it yourself.

  • Tutorial/HowTo for Java JFrame image map

    I am a first semester Java student and am required to program a very simple game. I want to paint a Super Mario theme using 30x30 pixel blocks. I have been going through tutorials for a few days on displaying gif/jpg/png within a jframe and all use different methods. Does anyone know of a tutorial that focuses on building a jframe that is filled by a 2d array, each array element being a png?
    I am new to JFrames having spent most my time with console/text only programming.

    Welcome to the Sun forums.
    atozer wrote:
    I am a first semester Java student and am required to program a very simple game. A 'very simple' game would be console based. Perhaps 'hangman' would fit the bill.
    .. I want to paint a Super Mario theme using 30x30 pixel blocks. Huhh.. What does 'theme' mean to you? Searching for 'Super Mario theme' all I could see was hits for the theme music. I take it this would be better described in a screen-shot. Do you have a link to one?
    ..I have been going through tutorials for a few days on displaying gif/jpg/png within a jframe and all use different methods. Does anyone know of a tutorial that focuses on building a jframe that is filled by a 2d array, each array element being a png?1) It is generally not a good idea to consider a root component such as a JFrame, JApplet, JWindow or JDialog to be the 'main area' of the GUI. Instead it is more common/useful to put the main GUI into a JPanel, which can then be put into any of the root level components as needed.
    2) I suspect your tutorial requirements are too specific for any single tutorial. Instead look to tutorials on 2D rendering, and separately to tutorials dealing with images. The 'creating a GUI' part is worthy of its own tutorial as well.
    I am new to JFrames having spent most my time with console/text only programming.And we come back to. A simple game is a console based game.
    If somebody was set on learning to create GUIs, I would recommend they steer clear of GUI based games until they have completed a number of GUI based projects that do not involve custom painting (let alone the intricacies of doing custom painting in a responsive game that renders at nn FPS), which I suspect is what is needed to recreate a Super Mario game.
    KISS!

  • How Do I search for an email?

    I want to search my gmail inbox which uses POP3 for emails. I want to be able to search for such terms as who its from and content of the email. Any suggestions on how to do this (I know I have to use javax.mail.Search)? An example? Tutorial? Thank you.

    Thanks for you help on searching, I figured it out. But I have one last question. I'm using the writeTo() to display an emails text. How Can I transfer this text to a string, or at least store it; so I could search through it and find keywords? public static void search() throws IOException {
             int i=0;
             String s;
             SearchTerm st=
             new AndTerm(
                      new FromStringTerm("Tim"),
                        new BodyTerm("Hello"));
                  try {
                        Message[] msgs = folder.search(st);
                        folder.search(st);
                        if(msgs.length > 0) {
                        System.out.println("MESSAGE FOUND");
                        msgs[i++].writeTo(System.out);
                        else {
                             System.out.println("NOT FOUND");
                   } catch (MessagingException e) {
                        System.out.println("ERROR");
                        e.printStackTrace();
            }

  • Tutorial files for cs6

    Hi,
    where can i find the tutorial files for cs6 (german).
    What is the best link to start learning cs6 (german).
    regards
    Michael

    I think you will find very little in German. You could search Youtube.
    If I were you I stick to English.
    Tutorials galore.

  • Good book or tutorial link for data socket

    hello,
    can anyone pls suggest me any good book or tutorial link to study  data socket

    Here is a link to the DataSocket overview.  This has a good description of what it is and would be a good beginning reference.
    DataSocket Overview
    If you are looking for a more technical approach then here is a technical paper about ways that DataSocket can be integrated into a test and measurement system. 
    DataSocket Technical Overview
    These should be a good starting point for you.  ThomasD also has posted some good resources that you could use to search for more specific questions about DataSocket.
    Hope it helps!
    Andy F.
    National Instruments

  • MIgration Assistant Stalls out on 'Searching for Disk...'

    The main problem here is, I reinstalled Snow Leopard after some acting up by the OS. Backed up ON my main HD and tried to use Migration Assistant to restore the backup. AS of now, every time I load up Migration Assistant, it just stalls on 'Searching for Disk...' and never finds a backup.
    I'll try and make a long story short, my optical drive was acting up so I took it in to the Genius Bar. Luckily, they had a new one in stock and replaced it on the spot. Upon getting my MacBook Pro (2009) back, everything was acting crazy. Lagging, freezing, etc. The genius told me it was normal that things start acting up after installing new hardware and that all I had to do was reinstall Snow Leopard and that before installation, it would ask me if I wanted to backup all my data and that once it was re-installed it would automatically come restore to its previous form. Here's where I think things got a little screwy...
    I was running Snow Leopard but unfortunately when I installed it, it was from a friend's 'family installation' pack, so I didn't have the installation CD at hand. Anxious to get things fixed, I put in my original installation disc that came with my MBP. Looking back, it should've been obvious that downgrading might cause some problems. Booted to disk and I went on to reinstall. Right before the reinstall it asked me if I wanted to backup all my data to restore once the installation was done. Sure enough, it seemed to have worked so I figured all was going well.
    The installation finished and asked me if I wanted to restore from a backup. Of course, hitting yes only gave me an error saying that the backup was created on a newer OS and that I wouldn't be able to restore it on an older OS. I was bummed out but it made sense. Fast forward another day: I call my friend and ask to borrow his Snow Leopard installation disc again. I install it, hoping to see the same, "Restore from Backup" screen at some point, but nothing.
    I noticed right away that I only had 16 GB of HD space left (what it was before any of this madness) but everything looked as if it was brand new. After some clicking around through some folders I found the old backup within some folders so I figured that everything worked fine and Migration Assistant would be a quick and easy fix. From here on, Migration Assistant can never seem to get past the loading screen. All I see is, "Searching for Disk" and an eternally spinning circle.
    Am I missing something? I've repaired disk partitions and done plenty of searching online. Am I just going to have to setup everything manually again? Thanks.
    -Raul

    Wow. Sorry, but you've made a major mess.
    I was running Snow Leopard but unfortunately when I installed it, it was from a friend's 'family installation' pack,
    That's a violation of the license. The +*family pack+* may be installed on up to 5 Macs in the same household. You need to buy your own copy of Snow Leopard.
    It sounds like the prompt you got form the Leopard disc was to +Preserve Users and settings.+ That's an +Archive and Install+ of Leopard. If so, there should be a +Previous System ...+ folder at the top level of your HD. If so, that's where you found your backed-up stuff.
    The +Restore System From Backup+ option on the DVD is to restore from Time Machine backups, and it doesn't sound like you've ever made any.
    And you cannot use +Migration Assistant+ on that folder. It works to transfer from one Mac (or Time Machine or "clone" backups of one), to a different one.
    If that's what you did, you'll have to install Snow Leopard over Leopard (that won't disturb anything else). When you start up, you'll have Snow Leopard and little else. You'll have to copy what you need from the +Previous System+ folder.
    |
    Once this is sorted out, in addition to buying Snow Leopard, you really should start making regular backups of your system. See the [Time Machine Tutorial|http://www.apple.com/findouthow/mac/#timemachinebasics] and perhaps browse [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum), and/or Kappy's post on [Basic Backup|http://discussions.apple.com/thread.jspa?messageID=12366915#12366915].

Maybe you are looking for