HOw to create a console in a GUI??

Hi,
i have redirectioned the java outoup to write in a file, it reacts perfectly to the system.out but when the new outpot becomes anything else as a printf nothing happens.
Anyone knows if it could be that the console is not "flusing" the messages.
all what i have tryed does not work and i am really desperado. So please it would be great any idea to solve the problem.
Here is what i have tryed, everything works with the system.out but not with the printf (maybe because the cmd is blocked??????) :
1.-
<code>
public static void main(String argh_my_aching_fingers[]){
final JTextArea textArea = new JTextArea(15, 40);
// Get the default system.out
final PrintStream sysOut = new PrintStream(System.out);
System.setOut(new PrintStream(new OutputStream() {
public void write(int b) throws IOException {
// write to the text area
textArea.append(String.valueOf((char)b));
// write to the default System.out
sysOut.write(b);
2.-
public static void main(String argh_my_aching_fingers[]){
try
// create a buffered reader that connects to the console, we use it so we can read lines
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
// read a line from the console
String lineFromInput = in.readLine();
// create an print writer for writing to a file
PrintWriter out = new PrintWriter(new FileWriter("myoutput.txt"));
// output to the file a line
out.println(lineFromInput);
// close the file (VERY IMPORTANT!)
out.close();
catch(IOException e)
System.out.println("Error during reading/writing");
the file only received the messages from the system.out
3.- the same, at least to write into a file everything but again failed.
<code>
// escribir en un archivo no funciona
try {
// Tee standard output
PrintStream out = new PrintStream(new FileOutputStream("out.log"));
PrintStream tee = new TeeStream(System.out, out);
System.setOut(tee);
// Tee standard error
PrintStream err = new PrintStream(new FileOutputStream("err.log"));
tee = new TeeStream(System.err, err);
System.setErr(tee);
} catch (FileNotFoundException e) {
// Write to standard output and error and the log files
System.out.println("welcome");
MainLogical logicalJava = new MainLogical();
logicalJava.GetIECRI1();// .GetInformationCommands();
System.out.println("bye");
<endcode>
NOTE / HINT:
that is the interface of the console:
<code>
//Make sure a nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("Ls test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(textArea,BorderLayout.CENTER);
frame.setSize(100,100);//setExtendedState(MAXIMIZED_BOTH);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
<endcode>
It would be super if anyone who face with this, could help me
Thanks.

Hi
i think i found teh problem of the communication.
My problem I think is that the Fortran and c libraries are filling the System.err output and waiting for the system to empty it.
When launched from a CMD shell it was OK, when launched from a java Runtime.Exec it was blocking.
Anyone knows how to force it to empty it??
Thanks

Similar Messages

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • 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 linux console/terminal using Java

    Please help, give some ideas or something...I would like to develop my own linux console/terminal to make connection to linux server.
    Please help me.
    Thanks

    That doesn't make any sense.
    Are you just trying to write output to the terminal, as you mentioned in this thread?
    http://forum.java.sun.com/thread.jspa?threadID=5287785

  • How to create "hole" in GUI

    Anyone know how to create a hole in the GUI that allows you to interact with the background? Any idea where to start learning? If there's no simple solution, can anyone tell me if I might be able to use 2d graphics to draw out of the GUI in order to produce the same effect?

    It sounds like you want to actually interact with the background rather than just seeing through it with the transparency. For transparent effects, start by looking at resources like [Hacking Swing: Translucent Windows|http://www.onjava.com/pub/a/onjava/excerpt/swinghks_hack41/index.html] and [Java SE 6 Update 10|http://java.sun.com/developer/technicalArticles/javase/java6u10/]. To actually have a hole in your HMI that allows for interaction with whatever is behind the HMI is beyond anything I've seen.

  • How to create the user on Internet Application Server(IAS) control console

    Hi All,
    My Client is asking me for How to create the user on Internet Application Server(IAS) control console 10.1.2( 10g release 2).
    If anyone have the document for How to Create the User on Internet Application Server (IAS) console 10g release 2 , then please send me the document and help me out from this Concern.
    Regards,
    Yadav@intelli.
    Edited by: 851080 on Apr 8, 2011 6:31 PM

    Are you using OID? Can you provide more details about your iAS environment?

  • How to create a user account by mirroring another account in PowerShell (Trying to learn to use Powshell for some daily AD tasks intead of the GUI)

    Hi,
    I am trying to create user accounts via PowerShell instead of the Gui in server 2008 R2 (PowerShell 2.0).
    I know how to create a user account with the following Power Shell command below is one from a dummy domain I created to practice.
    PS C:\Users\Administrator> New-ADUser -SamAccountName "TestOut" -UserPrincipalNa
    me "[email protected]" -GivenName "Test" -Surname "out" -DisplayName "Testou
    t" -Name "Testout" -Enabled $true -Path "CN=users,DC=bwcat,DC=net,DC=int" -Accou
    ntPassword (Read-Host -AsSecureString "Enter Account Password") 
    However when doing day to day tasks where I work normally we have a new hire, they contact IT and ask that a user account is created.   I will ask who they would like to mirror.
    I then would go into the gui pull up the user that they want to mirror right click him and choose copy.  This would create a new user account that I would then fill out.
    I am wondering if its possible to do this same thing via PowerShell, or  if its not an option because it takes more work type up everything than it does to go into the gui and do it.
    Anyway thanks for the help.

    Hi Wilder, hi Mark,
    first of all: The tutorial sources Mark posted - especially the book "Powershell 3 in A month of lunches" - are good to get a baseline start. A really great reference, especially when you try to learn it while still dealing with your daily business.
    On another note, Wilder: While I fully agree that learning things sequentially is usually the best, I too jumped right in instead of learning how to walk first (though it's been some time now. Fewer years than you'd think, but still ...). So I thought I'd
    give you a little aid with that function husk, so you could just stuff interesting bits into an available structure, making use of the fun tools in a useful context (It's fun fiddling around with the commands, but if you have to type in all of them manually
    each time, using the GUI is often just faster. Doing fun things and being efficient with it feels even better though ...). So ... while I
    do agree with yourself, learn it the Correct & Proper Way, I also do
    intend to finish this little explanation about the husk, all the way to the end.
    Everything below this paragraph is part of this.
    function Copy-ADUser
    <#
    .SYNOPSIS
    A brief description of the Copy-ADUser function.
    .DESCRIPTION
    A detailed description of the Copy-ADUser function.
    .PARAMETER GivenName
    A description of the GivenName parameter.
    .PARAMETER Surname
    A description of the Surname parameter.
    .PARAMETER Template
    A description of the Template parameter.
    .EXAMPLE
    PS C:\> Copy-ADUser -GivenName "Max" -Surname "Mustermann" -Template "Jonny.Normal"
    .NOTES
    Additional information about the function.
    #>
    [CmdletBinding()]
    Param (
    [Parameter(Mandatory = $true)]
    [string]
    $Surname,
    [Parameter(Mandatory = $true)]
    [string]
    $GivenName,
    [Parameter(Mandatory = $true)]
    [string]
    $Template
    ) # Create finished Strings
    $JoinedName = $GivenName + "." + $Surname
    # Create new User
    $NewUser = New-ADUser -Surname $Surname -GivenName $GivenName -DisplayName "$Surname, $GivenName" -SamAccountName $JoinedName -Name "$Surename, $GivenName" -PassThru
    # Copy from old User
    $NewUser | Add-ADPrincipalGroupMembership -MemberOf (Get-ADPrincipalGroupMembership $Template | Where { $_.Name -ne 'Domain Users' })
    # Do Whatever else you feel like doing
    This is again the same function husk I posted earlier. Only this time, I filled a little logic (the pieces that were already posted in this thread). This time, I'll not only go over each part again ... I'll do it by reposting the segments and trying to show
    some examples on how to modify the parts. Thus some of it will be repetitive, but this way all the info is in one spot.
    Segment: Comment Based Help
    <#
    .SYNOPSIS
    A brief description of the Copy-ADUser function.
    .DESCRIPTION
    A detailed description of the Copy-ADUser function.
    .PARAMETER GivenName
    A description of the GivenName parameter.
    .PARAMETER Surname
    A description of the Surname parameter.
    .PARAMETER Template
    A description of the Template parameter.
    .EXAMPLE
    PS C:\> Copy-ADUser -GivenName "Max" -Surname "Mustermann" -Template "Jonny.Normal"
    .NOTES
    Additional information about the function.
    #>
    That's the premier documentation part of a function, that teaches a user what the function does and how to use it. It's what's shown when using the Get-Help cmdlet.
    Comment texts are not restricted to single lines however. For example you could replace ...
    .EXAMPLE
    PS C:\> Copy-ADUser -GivenName "Max" -Surname "Mustermann" -Template "Jonny.Normal"
    ... with ...
    .EXAMPLE
    PS C:\> Copy-ADUser -GivenName "Max" -Surname "Mustermann" -Template "Jonny.Normal"
    Creates a new user named Max Mustermann and copies the group memberships of the already existing user Jonny Normal to this new User
    ... and get an explanation on what the example does when using Get-Help with the
    -Detailed parameter (Explaining examples is always a good idea).
    Segment: Parameter
    [CmdletBinding()]
    Param (
    [Parameter(Mandatory = $true)]
    [string]
    $Surname,
    [Parameter(Mandatory = $true)]
    [string]
    $GivenName,
    [Parameter(Mandatory = $true)]
    [string]
    $Template
    This is the segment that tells Powershell what input your function accepts. Each parameter of Copy-ADUser you set will be available in the next segment as a variable of the same name. You can add additional parameters if you need more information for your
    logic. For example, let's add a parameter that allows you to specify what Organization the new user should belong to:
    [CmdletBinding()]
    Param (
    [Parameter(Mandatory = $true)]
    [string]
    $Surname,
    [Parameter(Mandatory = $true)]
    [string]
    $GivenName,
    [string]
    $Organization,
    [Parameter(Mandatory = $true)]
    [string]
    $Template
    That's how that would look like. You may notice that I didn't add the line with
    "[Parameter(Mandatory = $true)] this time. This means you
    may add the Organization parameter when calling Copy-ADUser, but you need not.
    Segment: Logic
    # Create new User
    $NewUser = New-ADUser -Surname $Surname -GivenName $GivenName -DisplayName "$Surname, $GivenName" -SamAccountName "$GivenName.$Surename" -Name "$Surename, $GivenName" -PassThru
    # Copy from old User
    $NewUser | Add-ADPrincipalGroupMembership -MemberOf (Get-ADPrincipalGroupMembership $Template | Where { $_.Name -ne 'Domain Users' })
    # Do Whatever else you feel like doing
    This is the part of the function that does the actual work. Compared to the first husk I posted, this time there are two commands in it (and some comments). First, I create a new user, using the information passed into
    the parameters -Surname and -GivenName. Then I Copy the group memberships of the user identified by the information given by the
    -Template parameter.
    So, let's modify it!
    # Tell the user you are starting
    Write-Host "Starting to create the user account for $GivenName $Surname"
    # Create new User
    $NewUser = New-ADUser -Surname $Surname -GivenName $GivenName -DisplayName "$Surname, $GivenName" -SamAccountName "$GivenName.$Surename" -Name "$Surename, $GivenName" -PassThru
    # Tell the user you are copying Group Memberships
    Write-Host "Copying the group-memberhips of $Template to $GivenName $Surname"
    # Copy from old User
    $NewUser | Add-ADPrincipalGroupMembership -MemberOf (Get-ADPrincipalGroupMembership $Template | Where { $_.Name -ne 'Domain Users' })
    # Do Whatever else you feel like doing
    Now after adding a few lines, the logic will tell us what it's doing (and do so before it
    is taking action)!
    Hm ... didn't we create a change in the Parameter Segment to add an -Organization parameter? Let's use it!
    # If the -Organization parameter was set, the $Organization variable will be longer than 0. Thus do ...
    if ($Organization.Length -gt 0)
    # Tell the user you are starting
    Write-Host "Starting to create the user account for $GivenName $Surname in the Organization $Organization"
    # Create new User
    $NewUser = New-ADUser -Surname $Surname -GivenName $GivenName -DisplayName "$Surname, $GivenName" -SamAccountName "$GivenName.$Surename" -Name "$Surename, $GivenName" -Organization $Organization -PassThru
    # If the -Organization parameter was NOT set, the $Organization variable will have a length of 0. Thus the if-condition does not apply, thus we do the else block
    else
    # Tell the user you are starting
    Write-Host "Starting to create the user account for $GivenName $Surname"
    # Create new User
    $NewUser = New-ADUser -Surname $Surname -GivenName $GivenName -DisplayName "$Surname, $GivenName" -SamAccountName "$GivenName.$Surename" -Name "$Surename, $GivenName" -PassThru
    # Tell the user you are copying Group Memberships
    Write-Host "Copying the group-memberhips of $Template to $GivenName $Surname"
    # Copy from old User
    $NewUser | Add-ADPrincipalGroupMembership -MemberOf (Get-ADPrincipalGroupMembership $Template | Where { $_.Name -ne 'Domain Users' })
    # Do Whatever else you feel like doing
    There! Now we first check whether the -Organization parameter was set (it's not mandatory after all, so you can skip it). If it
    was set, do whatever is in the curly braces after if (...). However, if it wasn't set, do whatever is in the curly braces after
    else.
    And that concludes my "minor" (and hopefully helpful) tutorial on how to use the function husk I posted :)
    With this, whenever you find another cool command that helps you in the user creation process, you can simply add it, similar to what I did in these examples.
    And if it all didn't make much sense, go through the tutorials in proper order and come back - it'll make much more sense then.
    Cheers and good luck with PowerShell,
    Fred
    There's no place like 127.0.0.1

  • HOW TO: Create a GUI "Hello World"

     </p>
    This document describes how to create and run a very simple &quot;Hello World&quot;
    Java GUI app using JDeveloper. The application will have one button and one
    text field. Clicking the button will populate the text field with the message,
    &quot;Hello World!&quot;</p>
    Creating The New Application
    In this section, we will create an application with an empty frame.</p>
    <ol>
    [*]Choose File | New Workspace.
    </li>
    [*]Choose File | Save Workspace.
    </li>
    [*]Enter <TT>HelloGui.jws</tt> as the name for the workspace.
    This creates a Workspace called HelloGui. A workspace organizes all the projects
    you need to work on at one time.
    </li>
    [*]Choose File | New Project.
    The Project Wizard opens. This wizard will help you create a new project called
    HelloGui. A project contains all the files that go together in one &quot;tier&quot;--for
    example, all the files belonging to a single Java Application client, or all
    the files belonging to an Enterprise Java Bean. Because we are working on
    a simple, one-tier application, we will only need one project in our workspace.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Project Type page, in the What is the Project's Filename?
    field, change the filename to <TT>HelloGui.jpr</tt>. Leave the rest of the
    path the same.
    </li>
    [*]Select A Project containing a new... and choose Application
    from the dropdown list.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Options page, in the What is the name of the project's
    default package field, enter <TT>helloGui</tt>.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Information page, you can enter any information about your
    project that you wish.
    </li>
    [*]Click Finish.
    The Application Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloApp</tt>.
    </li>
    [*]Select the New Empty Frame radio button.
    </li>
    [*]Click OK.
    The Frame Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloFrame</tt>.
    </li>
    [*]Click OK.
    JDeveloper creates an application, <TT>HelloApp</tt>, containing an empty
    frame, <TT>HelloFrame</tt>. The source code for these classes appears in the
    Navigator, which is the upper left-hand pane in the JDeveloper IDE.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Adding a Panel to the Frame
    In this section, we will now add a panel to the frame. In the next section,
    we will add all the other components to this panel.</p>
    <ol>
    [*]In the Navigator, double-click <TT>HelloFrame.java</tt>.
    A viewer opens. This viewer has four tabs at the bottom:
    <ul>
    [*]Source, the currently active tab, which displays the source code
    of the selected class</li>
    [*]Design, which invokes a visual layout designer</li>
    [*]Class, which invokes an editor for the class' attributes, and
    can help you stay JavaBean complient</li>
    [*]Doc, which displays the class' JavaDoc
    </li>
    </ul>
    </li>
    [*]Click the Design tab.
    The viewer now displays a grey square, a graphical mock-up of your frame.
    Also, on the right-hand side of your screen, the Property Inspector opens.
    This allows you to quickly set attributes and define events for components.
    </li>
    [*]In the component palette (the tabbed toolbar near the top of your screen),
    select the Swing Containers tab.
    </li>
    [*]Click the blue square (described in rollover text as <TT>JPanel</tt>) and
    click on your frame to add the panel.
    The Property Inspector now displays attributes of the JPanel.
    </li>
    [*]In the Property Inspector, click twice inside the box beside the name
    field.
    </li>
    [*]Change the name to mainPanel.
    </li>
    [*]Click the box beside the layout field.
    </li>
    [*]Choose XYLayout.
    XYLayout is an easy-to-use Layout for prototyping. Later, we will change the
    layout to a more portable one.</li>
    </ol>
    Adding Components to the Panel
    In this section, we finish laying out a prototype UI. We will add polish and
    portability to the UI later.</p>
    <ol>
    [*]In the Component Palette, select the Swing tab.
    </li>
    [*]Select the <TT>JTextField</tt> component, which looks like a text field
    with a cursor.
    </li>
    [*]In your panel, click and drag the cursor to outline the text field.
    Don't worry if the text field doesn't have exactly the right size or position.
    We will adjust these later.
    The Property Inspector now displays attributes of the JTextField.
    </li>
    [*]In the Property Inspector, change the name (just as you did for the
    JPanel) to <TT>displayField</tt>.
    </li>
    [*]Change the text to nothing (erase the value that is already there).
    </li>
    [*]In the Component Palette, select the <TT>JButton</tt> component, which looks
    like a button being clicked.
    </li>
    [*]In your panel, click and drag the cursor to outline the button.
    The Property Inspector now displays attributes of the JButton.
    </li>
    [*]In the Property Inspector, change the name and action command
    to helloButton.
    </li>
    [*]Change the text to <TT>Say Hello!</tt>.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Wiring Up the UI
    In this section, we wire the UI so that clicking the button causes &quot;Hello
    World!&quot; to display in the text field.</p>
    <ol>
    [*]In the Property Inspector, select the Events tab.
    </li>
    [*]Click the box next to the Action Performed field and press the Enter
    key.
    This creates a method, <TT>helloButton_actionPerformed()</tt>, which will
    be invoked when the button is clicked, and displays the source code for the
    method stub in the viewer.
    </li>
    [*]In the viewer, add the following command to the body of the method:
    <TT>displayField.setText(&quot;Hello World!&quot;);</tt>
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Testing the Prototype Application
    <ol>
    [*]Choose Run | Run &quot;HelloApp&quot;.
    Your application appears, with a blank text field and a button labeled &quot;Say
    Hello!&quot;
    </li>
    [*]Click the button.
    The text &quot;Hello World!&quot; appears in the text field.
    </li>
    [*]Close your application.</li>
    </ol>
    Refining the UI
    In this section, we polish the UI so that the components have the right size
    and alignment, the text in the text field shows up red, and the panel uses the
    portable GridBag layout instead of the JDeveloper-specific XYLayout.</p>
    <ol>
    [*]In the viewer, select the Design tab.
    </li>
    [*]Select your text field.
    </li>
    [*]Drag the edges of your text field until it is the size you want.
    </li>
    [*]Drag the center of the text field until it is the vertical position you
    want.
    </li>
    [*]Right-click the text field and choose Align Center.
    This centers your text field horizontally in the frame.
    </li>
    [*]In the property inspector, click the box next to the foreground field.
    </li>
    [*]Click the ellipses (...).
    A color editor appears.
    </li>
    [*]Select Red from the dropdown list.
    </li>
    [*]Click OK.
    </li>
    [*]On your frame, select your button.
    </li>
    [*]Drag the right edge of your button until it is the horizontal size you want.
    </li>
    [*]Select your text field, and multi-select your button by control-clicking
    it.
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Same Size Vertical.
    This sets the height of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Align Center.
    This aligns the center of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Select your panel by clicking anywhere on the grey background in the visual
    designer.
    </li>
    [*]In the Property Inspector, click the box beside the layout field.
    </li>
    [*]Select GridBagLayout from the dropdown list.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Running the Finished Application From Within JDeveloper
    <ol>
    [*]Choose Run | Run &quot;HelloApp&quot;.
    Your application appears, with a blank text field and a button labeled &quot;Say
    Hello!&quot;
    </li>
    [*]Click the button.
    The text &quot;Hello World!&quot; appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    Deploying the Application to Your File System
    <ol>
    [*] In the Navigator, right-click <tt>HelloGui.jpr</tt> and choose New Deployment
    Profile.
    The Deployment Profile Wizard opens.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Delivery page, select Web Application or Command-Line Application
    from the dropdown list, and click Next.
    </li>
    [*]On the Staging Area page, in the Deployment Destination field, enter
    <tt><JDeveloper>/HelloGui</tt>, where <tt><JDeveloper></tt>
    is your JDeveloper root directory. Click Next.
    </li>
    [*]On the Project page, select all the <tt>.java</tt> files and click Next.
    </li>
    [*]Skip the Archive page and Applet Tags page by clicking Next on each.
    </li>
    [*]On the Libraries page, shuttle all libraries from the Project Libraries
    list to the Deployed Libraries list, and click Next.
    </li>
    [*]On the Finish page, name the profile <tt>HelloGui.prf</tt>, and click Finish.
    </li>
    [*]When JDeveloper asks you if you want to deploy now, click Yes.</li>
    </ol>
    JDeveloper will archive your application files and copy this archive and all
    other required libraries to <tt><JDeveloper>/HelloGui</tt>.</p>
    Running the Application from the Command Line
    <ol>
    [*]Open a command-line prompt.
    </li>
    [*]Enter the following script.
    Note: You may want to create a batch file containing this script. Be
    sure to replace JDeveloper_Home with your JDeveloper home directory.
    <pre>set __CLASSPATH_ROOT_DIR__=JDeveloper_Home\HelloGui
    set CLASSPATH=&quot;%__CLASSPATH_ROOT_DIR__%\HelloGui.jar&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\xmlparserv2.jar&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\classes12.zip&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\jdev-rt.zip&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\swingall.jar&quot;
    cd JDeveloper_Home\HelloGui
    jre -cp %CLASSPATH% helloGui.HelloApp</pre>
    </li>
    [*]Your application appears, with a blank text field and a button labeled &quot;Say
    Hello!&quot;
    </li>
    [*]Click the button.
    The text &quot;Hello World!&quot; appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    </p>
     </p>
    null

    Hello,
    I followed your instruction step by step to make this "Hello World", but when I run it, I got message "cannot find the runable node". What do I miss here? Thanks.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Avrom Faderman ([email protected]):
    </p>
    This document describes how to create and run a very simple "Hello World"
    Java GUI app using JDeveloper. The application will have one button and one
    text field. Clicking the button will populate the text field with the message,
    "Hello World!"</p>
    [b]Creating The New Application
    In this section, we will create an application with an empty frame.</p>
    <ol>
    [*]Choose File | New Workspace.
    </li>
    [*]Choose File | Save Workspace.
    </li>
    [*]Enter <TT>HelloGui.jws</tt> as the name for the workspace.
    This creates a Workspace called HelloGui. A workspace organizes all the projects
    you need to work on at one time.
    </li>
    [*]Choose File | New Project.
    The Project Wizard opens. This wizard will help you create a new project called
    HelloGui. A project contains all the files that go together in one "tier"--for
    example, all the files belonging to a single Java Application client, or all
    the files belonging to an Enterprise Java Bean. Because we are working on
    a simple, one-tier application, we will only need one project in our workspace.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Project Type page, in the What is the Project's Filename?
    field, change the filename to <TT>HelloGui.jpr</tt>. Leave the rest of the
    path the same.
    </li>
    [*]Select A Project containing a new... and choose Application
    from the dropdown list.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Options page, in the What is the name of the project's
    default package field, enter <TT>helloGui</tt>.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Information page, you can enter any information about your
    project that you wish.
    </li>
    [*]Click Finish.
    The Application Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloApp</tt>.
    </li>
    [*]Select the New Empty Frame radio button.
    </li>
    [*]Click OK.
    The Frame Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloFrame</tt>.
    </li>
    [*]Click OK.
    JDeveloper creates an application, <TT>HelloApp</tt>, containing an empty
    frame, <TT>HelloFrame</tt>. The source code for these classes appears in the
    Navigator, which is the upper left-hand pane in the JDeveloper IDE.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Adding a Panel to the Frame
    In this section, we will now add a panel to the frame. In the next section,
    we will add all the other components to this panel.</p>
    <ol>
    [*]In the Navigator, double-click <TT>HelloFrame.java</tt>.
    A viewer opens. This viewer has four tabs at the bottom:
    <ul>
    [*]Source, the currently active tab, which displays the source code
    of the selected class</li>
    [*]Design, which invokes a visual layout designer</li>
    [*]Class, which invokes an editor for the class' attributes, and
    can help you stay JavaBean complient</li>
    [*]Doc, which displays the class' JavaDoc
    </li>
    </ul>
    </li>
    [*]Click the Design tab.
    The viewer now displays a grey square, a graphical mock-up of your frame.
    Also, on the right-hand side of your screen, the Property Inspector opens.
    This allows you to quickly set attributes and define events for components.
    </li>
    [*]In the component palette (the tabbed toolbar near the top of your screen),
    select the Swing Containers tab.
    </li>
    [*]Click the blue square (described in rollover text as <TT>JPanel</tt>) and
    click on your frame to add the panel.
    The Property Inspector now displays attributes of the JPanel.
    </li>
    [*]In the Property Inspector, click twice inside the box beside the name
    field.
    </li>
    [*]Change the name to mainPanel.
    </li>
    [*]Click the box beside the layout field.
    </li>
    [*]Choose XYLayout.
    XYLayout is an easy-to-use Layout for prototyping. Later, we will change the
    layout to a more portable one.</li>
    </ol>
    Adding Components to the Panel
    In this section, we finish laying out a prototype UI. We will add polish and
    portability to the UI later.</p>
    <ol>
    [*]In the Component Palette, select the Swing tab.
    </li>
    [*]Select the <TT>JTextField</tt> component, which looks like a text field
    with a cursor.
    </li>
    [*]In your panel, click and drag the cursor to outline the text field.
    Don't worry if the text field doesn't have exactly the right size or position.
    We will adjust these later.
    The Property Inspector now displays attributes of the JTextField.
    </li>
    [*]In the Property Inspector, change the name (just as you did for the
    JPanel) to <TT>displayField</tt>.
    </li>
    [*]Change the text to nothing (erase the value that is already there).
    </li>
    [*]In the Component Palette, select the <TT>JButton</tt> component, which looks
    like a button being clicked.
    </li>
    [*]In your panel, click and drag the cursor to outline the button.
    The Property Inspector now displays attributes of the JButton.
    </li>
    [*]In the Property Inspector, change the name and action command
    to helloButton.
    </li>
    [*]Change the text to <TT>Say Hello!</tt>.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Wiring Up the UI
    In this section, we wire the UI so that clicking the button causes "Hello
    World!" to display in the text field.</p>
    <ol>
    [*]In the Property Inspector, select the Events tab.
    </li>
    [*]Click the box next to the Action Performed field and press the Enter
    key.
    This creates a method, <TT>helloButton_actionPerformed()</tt>, which will
    be invoked when the button is clicked, and displays the source code for the
    method stub in the viewer.
    </li>
    [*]In the viewer, add the following command to the body of the method:
    <TT>displayField.setText("Hello World!");</tt>
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Testing the Prototype Application
    <ol>
    [*]Choose Run | Run "HelloApp".
    Your application appears, with a blank text field and a button labeled "Say
    Hello!"
    </li>
    [*]Click the button.
    The text "Hello World!" appears in the text field.
    </li>
    [*]Close your application.</li>
    </ol>
    Refining the UI
    In this section, we polish the UI so that the components have the right size
    and alignment, the text in the text field shows up red, and the panel uses the
    portable GridBag layout instead of the JDeveloper-specific XYLayout.</p>
    <ol>
    [*]In the viewer, select the Design tab.
    </li>
    [*]Select your text field.
    </li>
    [*]Drag the edges of your text field until it is the size you want.
    </li>
    [*]Drag the center of the text field until it is the vertical position you
    want.
    </li>
    [*]Right-click the text field and choose Align Center.
    This centers your text field horizontally in the frame.
    </li>
    [*]In the property inspector, click the box next to the foreground field.
    </li>
    [*]Click the ellipses (...).
    A color editor appears.
    </li>
    [*]Select Red from the dropdown list.
    </li>
    [*]Click OK.
    </li>
    [*]On your frame, select your button.
    </li>
    [*]Drag the right edge of your button until it is the horizontal size you want.
    </li>
    [*]Select your text field, and multi-select your button by control-clicking
    it.
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Same Size Vertical.
    This sets the height of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Align Center.
    This aligns the center of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Select your panel by clicking anywhere on the grey background in the visual
    designer.
    </li>
    [*]In the Property Inspector, click the box beside the layout field.
    </li>
    [*]Select GridBagLayout from the dropdown list.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Running the Finished Application From Within JDeveloper
    <ol>
    [*]Choose Run | Run "HelloApp".
    Your application appears, with a blank text field and a button labeled "Say
    Hello!"
    </li>
    [*]Click the button.
    The text "Hello World!" appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    Deploying the Application to Your File System
    <ol>
    [*] In the Navigator, right-click <tt>HelloGui.jpr</tt> and choose New Deployment
    Profile.
    The Deployment Profile Wizard opens.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Delivery page, select Web Application or Command-Line Application
    from the dropdown list, and click Next.
    </li>
    [*]On the Staging Area page, in the Deployment Destination field, enter
    <tt><JDeveloper>/HelloGui</tt>, where <tt><JDeveloper></tt>
    is your JDeveloper root directory. Click Next.
    </li>
    [*]On the Project page, select all the <tt>.java</tt> files and click Next.
    </li>
    [*]Skip the Archive page and Applet Tags page by clicking Next on each.
    </li>
    [*]On the Libraries page, shuttle all libraries from the Project Libraries
    list to the Deployed Libraries list, and click Next.
    </li>
    [*]On the Finish page, name the profile <tt>HelloGui.prf</tt>, and click Finish.
    </li>
    [*]When JDeveloper asks you if you want to deploy now, click Yes.</li>
    </ol>
    JDeveloper will archive your application files and copy this archive and all
    other required libraries to <tt><JDeveloper>/HelloGui</tt>.</p>
    Running the Application from the Command Line
    <ol>
    [*]Open a command-line prompt.
    </li>
    [*]Enter the following script.
    Note: You may want to create a batch file containing this script. Be
    sure to replace JDeveloper_Home with your JDeveloper home directory.
    <pre>set __CLASSPATH_ROOT_DIR__=JDeveloper_Home\HelloGui
    set CLASSPATH="%__CLASSPATH_ROOT_DIR__%\HelloGui.jar"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\xmlparserv2.jar"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\classes12.zip"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\jdev-rt.zip"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\swingall.jar"
    cd JDeveloper_Home\HelloGui
    jre -cp %CLASSPATH% helloGui.HelloApp</pre>
    </li>
    [*]Your application appears, with a blank text field and a button labeled "Say
    Hello!"
    </li>
    [*]Click the button.
    The text "Hello World!" appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    </p>
    </p><HR></BLOCKQUOTE>
    null

  • How to create a new domain in BPEL console

    Hi
    Am new to BPEL can some one let me know how to create domain in BPEL console
    Thanks
    Baji

    Hi.
    1 - You go to the BPEL Admin page:
    http://host:port/BPELAdmin
    2 - click on tab BPEL Domains
    3 - Click Create new BPEL domain
    4 - In Domain Id field, you place the name of your domain. Click Create.
    Denis

  • How to create a .par file from console apart from tools like eclipse,studio

    Plz reply me if any body knows how to create .par file from Console i.e command prompt.just like creation of .jar & .war file in java.I have created some iViews and making .par files from tool Eclipse/Netweave rstudio etc..I waqnt to create from console..How it is possible?
    Regards
    Sridhar Raju

    Hi Sridhar,
    I'm unsure for what you'd need this, but in general there are at least two possibilities:
    - manually pack everything into the dir structure needed (documented here: http://help.sap.com/saphelp_nw04/helpdata/en/f9/561140d72dc442e10000000a1550b0/frameset.htm ), than create a ZIP with some command line tool (e.g. JAR), naming it to .par.
    - use ANT to do this; with this, you can even deploy the file, see PAR-File deployment with ANT (EP6)
    Hope it helps
    Detlev

  • How to create a gui pf status and guititle in module pool programming?

    hi frnds,
    how to create a gui pf status and gui title in module pool programming?
    my problem is i created a screen and wen execute the screen by a tcode.am nt able to activate SAVE BACK EXIT CANCEL COMMANDS?.how to do this can any one explain in detail procedure?
    plz gve step by step process.

    Hi,
    For Title:In PBO...just write
    SET TITLEBAR 'ZTITLE'.
    double click on 'ZTITLE'....give whatever title u want...save it...activate...and check...reward points if useful...
    PF means FUNCTION CODE
    ex; set pf-status 'zrstatus'.
    double click on the zrstatus expand the application server ,
    at the time of execution the default menu(ie system,help),application toolbar buttons like enter,help etc and function keys(by default there will be no function keys)as are there on the normal
    will appear on the screen.
    Details:
    PF-STATUS is used to set the GUI Status of a screen, ie you can control the options on your menu bar, application toolbar, the function keys assigned to various options etc.
    Implementing the status for a screen can be done in 2 ways:
    1) Create the GUI status using the object list of the program or by using the transaction SE41. Then, assign it to the screen using SET PF-STATUS statement.
    2) Create the GUI status by means of forward navigation, ie, use the SET PF-STATUS 'XXX' statement where 'XXX' is the name of the GUI status and double click on it to create it.
    Status names can have a maximum of 20 characters.
    After assigning a GUI status to a screen, this is inherited to all subsequent screens. In order to have a different status for each of the subsequent screens, you have to set a separate status for each screen.
    In transaction SE41,
    1) Give the program name and the status name and click on the Create button.
    2) Go to 'Function keys' and expand.
    3) On top of the save icon type SAVE, on top of the back icon type BACK, on top the the exit icon type EXIT etc ie on top of all the icons that you want to use, type the respective names that you want to give.
    Whatever you have typed now becomes the function codes of these icons and can be used in your program.
    For example you have a screen 100.
    In the 'Element list' tab of the screen, give "ok_code" as the name where "OK" is the type of screen element. Activate screen.
    The flow logic for the screen looks like this:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    Create the modules STATUS_0100 and USER_COMMAND_0100 in the main program by simply double clicking on them.
    The code for these modules can be something like this:
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'Example'. "Example is the name of the GUI status
    ENDMODULE.
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'SAVE'.
    "call a subroutine to save the data or give statements to save data.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.
    Regards,
    Shiva Kumar (Reward If helpful)

  • How to create an rule with action to subtract from the event log of Ips manager express console?

    how to create an rule with action to subtract from the event log of Ips manager express console?, some knows of has an guide?.
    Thank you.
    Sent from Cisco Technical Support iPad App

    Hi,
    http://www.cisco.com/en/US/products/sw/secursw/ps2113/products_tech_note09186a0080bc7910.shtml
    HTH
    Luis Silva
    "If you need PDI (Planning, Design, Implement) assistance feel free to reach us"
    http://www.cisco.com/web/partners/tools/pdihd.html

  • How to hide display details in sap gui and create ad-hoc request in UWL?

    Hi,
    how to hide display "details in sap gui" and "create ad-hoc request" in UWL?
    Please telme the step-by-step procedure to hide "details in sap gui" and "create ad-hoc request".
    Thanks,
    Rashmi

    Hi,
    Thanks for the information. It was very helpfull.
    Can you please tellme where can we fine UWL iView? I tried to find this out in two ways.
    1) Portal Content -> Content Provided by SAP -> End User Content -> Standard Portal Users -> Views -> com.sap.coll.iviews -> Universal Worklist (finally i got this iView). Here i dint find any property called "List of UWL Actions to exclude". In the link which you had given, its written that we can modify the iView and add the name of the actions under the Actions to exclude from the UWL property.
    Which iView do we need to modify and where can i find that property?
    2) I downloaded the xml file and then tried to find this property "List of UWL Actions to exclude" or " Actions to exclude from the UW". But i couldnt find both the properties in xml file.
    Thanks,
    Rashmi

  • How to create a array of GUI components?

    Hello, everyone!
    I need help or advice how to create an GUI components array. As I remenber in VB this possible just by calling two or more buttons (for example) with the same name. The API will authomatically create an array: Buton[0], Button[1], Button[2] and so on...
    In Java it possible as well:
    JButton button[];
    button = new JButton[10];
    for ( int i = 1; i < 10; i++ ){
    button[i] = new JButton();
    ....and so on....
    But my problem is that I use Forte for Java v. 3.0 and when I using Frame Editor it does not allow me to call two components with the same name and at the same time does not allow to change the initialization code painted in blue color...
    Does anyone knows how to avoid this, or how to create GUI components array in Forte for Java API using Frame Editor or Component Inspector???
    All that I need is few buttons accessible by index ( button[1], button[2] etc.) I will apreciate any help or advise.
    Thank you in advance,
    Michael

    I tried using Forte after having used Windows notepad and found that I
    like notepad much better. If you seem to be having problems with Forte,
    you might just try writing this portion of code in a regular text editor
    and compiling it with a command line compiler. Hope this helps some.

  • How to create a form which uses graphical user interfaces(GUI) features.

    i'm working as a administrator in a private college..i have some problem..
    how to create a student registration form that uses most of the graphical user interfaces(GUI) features. The form should consist of the following features:- Label, Button, Check box, Radio Button, List, Panel and Layout. The GUI features must be functional.
    how to write that programme in JAVA ?
    please help me to get the code..

    So are you saying that this person is legitamately asking for someone to write up this student registration form, for use in some sort of production student registration application? Ok, if so, I apologize for jumping to the wrong conclusion. But, to me it sounds like a student hit the "Using Swing" chapter in the text and was given the following assignment:
    For this assignment you are working as an administrator in a private college and you need to solve the following problem:
    You need to create a student registration form that uses most of the graphical user interfaces(GUI) features. The form should consist of the following features:- Label, Button, Check box, Radio Button, List, Panel and Layout. The GUI features must be functional.
    You have two weeks.
    Now, I suppose that I could be wrong, if so, I apologize and go with the previous poster that said ask a comp sci student to do this for you.
    Lee

Maybe you are looking for