Calling a GUI component form jbase program
Hello all,
I have created a GUI component in Java. When I run it form DOS prompt its works fine,
but when I call it form a Jbase subroutine the GUI is never displayed....the component runs in the background but for some reason its not visible.....plz help....
Ankit.
I am facing the same problem It calls the AWT but doesnt display it. Please help Thanks
Divesh
Similar Messages
-
"call other GUI(not labview GUI) in labview"
HI
I have developed a labview program for controlling a set of hardwares. one of my hardwares have a windows based program itself(independent of labview) that contains a GUI that enable me to control the hardware.now i want to know if is it possible for me to call that GUI in my labview program and show that in my labview GUI. i dont want to use of labview call library function.
regardsYou can do that if your GUI supports ActiveX. Learn more here.
http://forums.ni.com/ni/board/message?board.id=170&message.id=358104&query.id=1450806#M358104 -
Calling a module component from a diff form
Hi guys,
Does any one know how to:
call a module component of a form from a nother from using call form procedure or any diff method.
ThanksHello,
Open the on-line help of the Forms Builder : Ctrl+H
click the Index tab, enter CALL_FORM then click : Calling Modal Forms with CALL_FORM then the OPEN button.
You can find the example you search.
Francois -
Sapscript calling forms from program
Hi experts
I need to write a form in a program to get values.
Here is my code. But i cant seem to succesfully compile it. Need help. I want to take
ernam from sapscript and send name and lastname back. Can u please fill the function.
Also i have an error says itcyy is not a structure ?
thanks.
REPORT ZME23N_SAPSCR_FM.
tables : user_Addr.
form get_Values TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
*READ TABLE IN_PAR WITH KEY 'ERNAM'.
*data firstname like user_addr-name_first.
*select single * from user_Addr
*where bname = ernam.
*firstname = user_Addr-name_first.
*lastname = user_addr-name_last.
endform.You can use the PERFORM command to call an ABAP subroutine
(form) from
any program, subject to the normal ABAP runtime
authorization
checking. You can use such calls to subroutines for
carrying out
calculations, for obtaining data from the database that is
needed at
display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed
when a
document is formatted for display or printing.
Communication between a
subroutine that you call and the document is by way of
symbols whose
values are set in the subroutine.
The system does not execute the PERFORM command within
SAPscript
replace modules, such as TEXT_SYMBOL_REPLACE or
TEXT_INCLUDE_REPLACE.
The replace modules can only replace symbol values or
resolve include
texts, but not interpret SAPscript control commands.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of
the four
SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must
therefore be
character strings.
The ABAP subroutine called via the command line stated
above must be
defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
The values of the SAPscript symbols passed with /: USING...
are now
stored in the internal table IN_TAB . Note that the system
passes the
values as character string to the subroutine, since the
field Feld
VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR
80). See the
example below on how to access the variables.
The internal table OUT_TAB contains names and values of the
CHANGING
parameters in the PERFORM statement. These parameters are
local text
symbols, that is, character fields. See the example below
on how to
return the variables within the subroutine.
From within a SAPscript form, a subroutine GET_BARCODE in
the ABAP
program QCJPERFO is called. Then the simple barcode
contained there
('First page', 'Next page', 'Last page') is printed as
local variable
symbol.
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY 'PAGE'.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'NEXTPAGE'.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY 'BARCODE'.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = '|'. "First page
ELSE.
OUT_PAR-VALUE = '||'. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = 'L'. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM. -
How to call a portal component in a java program
Hi guys,
We need to add some more operation after user log into portal, thus we need to call a portal component after statement proxy.logon(null) from java program SAPMLogonLogic.java,
Any ideas how can we call the component directly?
ThanksHi,
We can access iview,page,role(pcd objects) thru APIs
refer [this link|http://help.sap.com/saphelp_nw04/helpdata/en/5f/cf9d4207e1c86ae10000000a155106/frameset.htm].
may be u can use these APIs to do the task.
do revert. -
A sort of KeyListener without a GUI Component?
a sort of KeyListener without a GUI Component? ( or any trick that will do)?
please be patient with my question
I can't express myself very well but it's very important.
Please help me I need an example how to implement
a way to detect some combination of keystrokes in java without
any GUI ( without AWT or Swing frames ...)
just the console (DOS or Linux shell window) or with a minimzed
java frame (awt or swing...) you know, MINIMIZED= not in focus.
in other words if the user press ctrl + alt +shift ...or some
other combination... ANYTIME ,and the java program is running in the
background, is there a way to detect that,
... my problem if I use a frame (AWT or SWING) the windows must
be in focus and NOT MINIMIZED..
if I use
someObject.addKeylistener(someComponent);
then the "someComponent" must be in focus, am I right?
What I'm coding is a program that if you highlight ANY text in
ANY OS window, a java window (frame) should pop up and match the
selected text in a dictionary file and brings me the meaning
( or a person's phone number , or
a book author ...etc.)
MY CHALLENGE IS WITHOUT PRESSING (Ctrl+C) to copy and paste
...etc. and WITHOUT MONITORING THE OS's CLIPBOARD ...I just want to
have the feature that the user simply highlight a text in ANY
window anywhere then press Ctrl+shift or some other combination,
then MY JAVA PROGRAM IS TRIGGERED and it should EMULATE SOME
KEYSTROKES OF Ctrl+C and then paste the clipboard
somewhere in my program...with all that AUTOMATION BEING in the background.
remember that my whole program ALL THE TIME MUST BE MINIMIZED AND
NOT IN FOCUS
or just running in the background (using javaw)..
is there any trick ? pleeeeeeze!!!
i'm not trying to write a sort of the spying so-called "key-logger"
purely in java but it's a very similar challenge.
please reply if you have questions
I you could please answer me , then guys this would be very
valuable technique that I need urgently. Thanks!DO NOT CROSS POST especially since this has nothing to do with game development at all. I can understand if it was in Java programming and New to Java but even then pick a forum and post it to that one and that one only.
-
What is this gui component?
HI all, I'm writing a program and I wish to use a gui component but I don't know what it is called and I was wondering if any of you could help.
Its kind of like a text area but the text is separated into columns and each of the columns have headings. Each of the headings can be extended to show more of the text. It's like in microsoft windows when you view files showing all their detail and you get the headings name, size, date created etc.
Any help on this matter would be greatly appreciated.
ThanksIt's not a jTable as that is more like a spreadsheet, it's similar but the edges of the cells aren't visible in what i'm talking about. and also what i'm after has 'tabs' at the top with headings in. If anyone uses a peer to peer file sharing application, its like what the results of a search are displayed in.
Thanks for the help but if anyone has any more ideas they are very welcome -
Thread wont update GUI component
I'm developing an RMI application. I can't seem to get the gui components to show their value once their value has been set. I know the value has been set because i can retrieve it and print it out using System.out.println("Client status : " + lblYourStatus.getText());
My thread gets called when there's a Property ChangeEvent, the code executes correctly but the gui component still doesn't show the correct value.
Am i implementing the code for the thread incorrectly? or am i missing something else?
Any help would be appreciated, this has been wrecking my head for a while now.
private void jPanel1PropertyChange(java.beans.PropertyChangeEvent evt) {
System.out.println("in propertyChange()");
// lblYourStatus.setText(clientStatus);
Thread t = new Thread(this);
t.setDaemon(true);
t.start();
public void run()
// while (true)
try
SwingUtilities.invokeLater(new Runnable()
public void run()
lblYourStatus.setText(clientStatus);
System.out.println("Client status : " + lblYourStatus.getText());
catch (Exception e)
try
Thread.sleep(1000);
catch(Exception e) {}
// } //end while
}I don't think the RMI can affect it. It's the same for one client as it is for multiple clients. All the clients receive the correct values. I have been using System.out.println() statements to follow the program as it's been executing and everything seems to work as it should. I changed the code using the example you directed me to.
It still receives all the correct values but when i set the label text the gui still doesn't show the text if i pass it in as a variable eg lblPlayer1Name.setText(m_player1Name), it still shows literal values eg lblPlayer1Name.setText( "test")
I know the variable names contain valid values as i use System.out.println() statements to view them.
any more ideas? thanks for your help so far.
private void jPanel1PropertyChange(java.beans.PropertyChangeEvent evt) {
Thread t = new Thread(this);
// t.setDaemon(true);
t.start();
public void updateDetails(boolean gameInProgress, String status, String player1Name, String player2Name, int numSpectators)
m_clientStatus = m_clientStatus + status;
m_player1Name = player1Name;
m_player2Name = player2Name;
lblYourStatus.setText(m_clientStatus);
lblPlayer1Name.setText(m_player1Name);
lblPlayer2Name.setText(m_player2Name);
public void run()
// SwingUtilities makes sure code is executed in the event thread.
SwingUtilities.invokeLater(new Runnable()
public void run()
//this line wont print the value to the screen eventhough the next System.out.println() statement shows that the variable contains a valid string
lblPlayer1Name.setText(m_player1Name);
System.out.println("Player 1 variable value: " + m_player1Name);
System.out.println("Player 1 label value: " + lblPlayer1Name.getText());
lblPlayer1Name.setText(lblPlayer1Name.getText());
//this line will print the literal string "Tom" to the label
lblPlayer1Name.setText("Tom");
// simulate log running task
// try { Thread.sleep(1000); }
// catch (Exception e) {}
SwingUtilities.invokeLater(new Runnable()
public void run()
lblPlayer2Name.setText(m_player2Name);
System.out.println("Player 2 variable value: " + m_player2Name);
System.out.println("Player 2 label value: " + lblPlayer2Name.getText());
} -
A sort of KeyListener with a MINIMIZED GUI Component MINIMIZED?
a sort of KeyListener without a GUI Component? ( or any trick that will do)?
please be patient with my question
I can't express myself very well but it's very important.
Please help me I need an example how to implement
a way to detect some combination of keystrokes in java without
any GUI ( without AWT or Swing frames ...)
just the console (DOS or Linux shell window) or with a minimzed
java frame (awt or swing...) you know, MINIMIZED= not in focus.
in other words if the user press ctrl + alt +shift ...or some
other combination... ANYTIME ,and the java program is running in the
background, is there a way to detect that,
... my problem if I use a frame (AWT or SWING) the windows must
be in focus and NOT MINIMIZED..
if I use
someObject.addKeylistener(someComponent);
then the "someComponent" must be in focus, am I right?
What I'm coding is a program that if you highlight ANY text in
ANY OS window, a java window (frame) should pop up and match the
selected text in a dictionary file and brings me the meaning
( or a person's phone number , or
a book author ...etc.)
MY CHALLENGE IS WITHOUT PRESSING (Ctrl+C) to copy and paste
...etc. and WITHOUT MONITORING THE OS's CLIPBOARD ...I just want to
have the feature that the user simply highlight a text in ANY
window anywhere then press Ctrl+shift or some other combination,
then MY JAVA PROGRAM IS TRIGGERED and it should EMULATE SOME
KEYSTROKES OF Ctrl+C and then paste the clipboard
somewhere in my program...with all that AUTOMATION BEING in the background.
remember that my whole program ALL THE TIME MUST BE MINIMIZED AND
NOT IN FOCUS
or just running in the background (using javaw)..
is there any trick ? pleeeeeeze!!!
i'm not trying to write a sort of the spying so-called "key-logger"
purely in java but it's a very similar challenge.
please reply if you have questions
I you could please answer me , then guys this would be very
valuable technique that I need urgently. Thanks!I asked the very same question some time ago. From what I've heard you can not do this purely in java cause it would be a major secrity flaw and it could make whole systems extremely buggy since it could cause the program not to overload the keys assigned to end it.
However if anyone knows a way to "hack" win xp's windowsystem or any other way to deal with this let us know plzzz (is it possible to make some kind of dll file etc.) -
How to call a maintenance view from a program
Hello Abapers,
Can anybody explain with some examples. How to call a mainetenance view from a program.
Thanks
Ranjith.Use FM 'VIEW_MAINTENANCE_CALL'.
REPORT zmaintaintest.
VARIABLES / CONSTANTS
CONSTANTS:
c_action(1) TYPE c VALUE 'U', "Update
c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
c_field(6) TYPE c VALUE 'EMPNO'. "Field Name
INTERNAL TABLES
DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
v_empno TYPE zempno,
wa_rangetab TYPE vimsellist.
SELECTION SCREEN
PARAMETERS: p_empno TYPE zempno OBLIGATORY. "Emplyee ID
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
Chcking the existence of the user in EMPLOYEE table
PERFORM validate_employee.
START_OF_SELECTION
START-OF-SELECTION.
This will restrict the user view so that user can only view/change
Table data corresponding to his/her Employee ID
PERFORM define_limited_data_area.
Displaying table maintenance view for a particular employee ID
PERFORM call_view_maintenance.
*& Form validate_employee
Validate plant entered in the selection screen
FORM validate_employee.
SELECT SINGLE empno u201CEmployee ID
FROM zemp_example u201CEmployee Table
INTO v_empno
WHERE empno = p_empno.
IF sy-subrc <> 0.
MESSAGE 'Not an Valid User' TYPE 'I'.
ENDIF.
ENDFORM. "validate_employee
*& Form DEFINE_LIMITED_DATA_AREA
To restrict the user view so that user can see/change table data
corresponding to his employee ID. Here one internal table is
getting populated with field name as u201CEMPNOu201D (Key field of the table)
And value as given by user in Selection Screen and this is passed as
Parameter in function module 'VIEW_MAINTENANCE_CALL'
FORM define_limited_data_area.
CLEAR wa_rangetab.
wa_rangetab-viewfield = c_field.
wa_rangetab-operator = 'EQ'.
wa_rangetab-value = p_empno.
APPEND wa_rangetab TO itab_rangetab.
ENDFORM. "define_limited_data_area
*& Form CALL_VIEW_MAINTENANCE.
Displaying table maintenance view for a particular employee ID
FORM call_view_maintenance.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = c_action
view_name = c_viewname
TABLES
dba_sellist = itab_rangetab.
ENDFORM. "call_view_maintenance
Regards,
Joy. -
Issue calling report from a Form(11.1.2).
Hi,
I have an existing code in the form to call a report and it seems to be working in the current 10g version of production server and I am migrating forms 10g to 11gR2. My issue here is when, I want to call the report from Forms 11g ( i.e. in developer suite) it is taking the report server as a blank. My Oracle FMW (11.1.2) is installed on the Windows 2008 R2 server. I do not know, if I need to configure the report server locally after the installation of FMW. Please help me out, if someone has faced a similar issue before.
DECLARE
rep_Report report_object := find_report_object('XYZ');
rep_server varchar2(100);
rep_jobidFull varchar2(100);
rep_jobidPartial varchar2(100);
BEGIN
-- Get the report server name
tool_env.getvar('REPORTS_SERVER_NAME', rep_server); --UNIX
IF rep_server IS NULL THEN -- WINDOWS
tool_env.getvar('HOSTNAME', rep_server);
END IF;
message('rep_server'||' '||rep_server);
SET_REPORT_OBJECT_PROPERTY(rep_Report,REPORT_SERVER,rep_server);
rep_jobidFull := run_report_object(rep_Report, pl_id);
message('rep_jobidFull'||' '||rep_jobidFull);
rep_jobidPartial := substr(rep_jobidFull,length(rep_server)+2,length(rep_jobidFull));
message('rep_jobidPartial'||' '||rep_jobidPartial);
web.show_document('/reports/rwservlet/getjobid'||rep_jobidPartial||'?server='||rep_server,'_blank');
END;
Errors:
FRM-41211: Integration error: SSL failure running another product.
REP-51000: The Reports Server name is not specified.
Thnx,
Sona.Hello,
Usually in development installation report server gets installed by default unless you uncheck it.
You can find the report server name by:
a)looking into rwservlet.properties file
or
b)as entry in Start > All Programs > Oracle Classic instance - asinst_1 > Reports Services > Start Report Server rep_wls_reports_<hostname>_<InstanceName>
or
c)http://<yourhostname>:7001/reports/rwservlet/getserverinfo
In order to run the report from froms you need:
-to implement the solution i described in a previous update
or
-use a harcoded value in the form
SET_REPORT_OBJECT_PROPERTY(rep_Report,REPORT_SERVER,'your_report_server name');
Since you are in 11gR2 development mode you cannote use EM or OPMN to get the status of the report server as Roberto Suggested.
For your reference also check:
Oracle Forms and Reports 11g Release 2 (11.1.2) Development Installation FAQ (Doc ID 1373210.1)
Regards,
Alex
If someone answer helped please mark it accordingly. -
How to call a report from form in developer suite 10g
i want to call report from a form that is developed in Builder 10g. Reprot is also built in Reports Builder 10g. I now want to run report through form.Please give me any solution.
I am finding that this document is unhelpful also with respect to running a form which calls the report in the testing environment of Oracle Developer Suite. I have Googled for forms integration with reporting and most refer to this document, but it does not help.
I have download and used the "run_report_object_doc" procedure they provided, along with a supporting function. And used that.
This document indicates that if the sever is not specified then it will use the in-process server. This does not happen. When I do not specify the server I get the notorious "FRM-41211: Integration error: SSL failure running another product." I suspected that the in-process server is not getting called.
When I look through the rwservlet.properties file I find that the servlet is configured with in=process "yes". I have since changed this file so that a server is actually named. I called it "local".
This time a local.conf file is created, not a rep_local.conf file as indicated in the documentation. Anyhow when I try the form again I get the same FRM-41211 message.
Alternatively, I have change the report invocation parameters to supply a server name "local". This time I no longer get the FRM-41211 message. I get the error FRM-41214: Unable to run report.
When I use the servlet to get information, I get (can anyone see any setting that is a problem?):
http://localhost:8889/reports/rwservlet/showenv?server=local
OracleAS Reports Services - Servlet Environment Variables Return to Top
KeyMapFile C:\DevSuiteHome_1\reports\conf\cgicmd.dat
DBAUTH C:\DevSuiteHome_1\reports\templates\rwdbauth.htm
SYSAUTH C:\DevSuiteHome_1\reports\templates\rwsysauth.htm
server local
DIAGNOSTIC yes
traceopts undefined
ERRORTEMPLATE C:\DevSuiteHome_1\reports\templates\rwerror.htm
SERVER_IN_PROCESS yes
COOKIEEXPIRE 30
ENCRYPTIONKEY reports9i
DIAGHEADTAGS undefined
DIAGBODYTAGS undefined
HELPURL undefined
RELOAD_KEYMAP NO
IMAGEURL http://localhost:8889/reports/rwservlet
SINGLESIGNON yes
OracleAS Reports Services - Server and Engine Environment Variables Return to Top
PATH C:\DevSuiteHome_1\jdk\jre\bin\client;C:\DevSuiteHome_1\jlib;C:\DevSuiteHome_1\bin;C:\DevSuiteHome_1\jre\1.4.2\bin\client;C:\DevSuiteHome_1\jre\1.4.2\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\oracle\product\10.2.0\client_1\bin;C:\Program Files\CA\Dcs\DMScripting\;C:\Program Files\CA\DCS\CAWIN\;C:\CAisd\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Program Files\ZipGenius 6\;c:\Program Files\CA\SharedComponents\ScanEngine;C:\PROGRA~1\CA\ETRUST~2;C:\Program Files\CA\Unicenter Software Delivery\BIN;C:\PROGRA~1\CA\SHARED~1\CAM\bin;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponents\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\SubscriptionLicense\;C:\Program Files\CA\eTrustITM;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Microsoft Office\Office10;C:\Program Files\CA\DSM\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\DevSuiteHome_1\jdk\jre\bin
DISPLAY
LD_LIBRARY_PATH
ORACLE_HOME C:\DevSuiteHome_1
TNS_ADMIN
NLS_LANG AMERICAN_AMERICA.WE8MSWIN1252
USER_NLS_LANG
RW C:\DevSuiteHome_1\reports
REPORTS_PATH C:\DevSuiteHome_1\repadm61\srw;C:\DevSuiteHome_1\cgenr61\admin\crretc;C:\DevSuiteHome_1\cgenr61\admin;C:\DevSuiteHome_1\reports\templates;C:\DevSuiteHome_1\reports\samples\demo;C:\DevSuiteHome_1\reports\integ;C:\DevSuiteHome_1\reports\printers;
REPORTS_TMP C:\Temp
REPORTS_TAGLIB_URI /WEB-INF/lib/reports_tld.jar
java.class.path C:\DevSuiteHome_1\j2ee\home\lib\ojsp.jar;C:\DevSuiteHome_1\reports\jlib\rwrun.jar;C:\DevSuiteHome_1\jlib\zrclient.jar
sourceDir
tempDir
useDataCache
ignoreDataParameter -
Calling Report from a Form on the same page
Hi,
We have a SEARCH Form and when user inputs search criteria, then we want to call a report on the same page, just below the search button. We tried many things but the report does not show up on the same page, it navigates to next page.
Please help..
Thanks
Kumar.I am trying to do a similar thing... I have created a form application component and a Report application component which is called from the search form. This works fine.
I expose the search form as a component and put it on a portal page. I do the same with the report.
When I call the page and enter the search params in the form and call the report, the report appears in a separate non-portal window. I would like the report in the same portal page to be run in-line with the new parameters.
Has anyone done this before? -
How to use one forms fields, program units in another form.
The whole proceessing and update is happening in one main form.
Main form has all the fields and a reprocess button which re-creates records if they have error. Record name is the primary key.
I have another small form, which just shows the list of record names in the system. I want a reprocess button next to each record name so that user will be able to just select any record name and press reprocess button to recreate any record data.
There are a lot of fields in main form and program units , which are used by the reprocess button.
Any suggestions like how to go for it?You can either pass all the relevant data from the Small Form to the Larger form and make it reprocess the data or you can move the Program Units to a PL/SQL Library (.pll) and attach the library to your smaller form where you can call the program units. Either option requires changes to the Larger form to enable it to process a record passed to the form as a parameter or to externalize the Forms Program Units to a library.
Personaly, I would recommend you move the Program Units to a Library. This would enable you to use the processes in any form (that has the library attached).
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Using my new GUI component in an applet :Help!!!
I am seeking help for the following
Define class MyColorChooser as a new component so it can be reused in other applications or applets. We want to use the new GUI component as part of an applet that displays the current Color value.
The following is the code of MyColorChooser class
* a) We define a class called MyColorChooser that provides three JSlider
* objects and three JTextField objects. Each JSlider represents the values
* from 0 to 255 for the red, green and blue parts of a color.
* We use wred, green and blue values as the arguments to the Color contructeur
* to create a new Color object.
* We display the current value of each JSlider in the corresponding JTextField.
* When the user changes the value of the JSlider, the JTextField(s) should be changed
* accordingly as weel as the current color.
* b)Define class MyColorChooser so it can be reused in other applications or applets.
* Use your new GUI component as part of an applet that displays the current
* Color value.
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.text.DecimalFormat;
public class MyChooserColor extends JFrame{
private int red, green, blue; // color shade for red, green and blue
private static Color myColor; // color resultant from red, green and blue shades
private JSlider mySlider [];
private JTextField textField [];
// Panels for sliders, textfields and button components
private JPanel mySliderPanel, textFieldPanel, buttonPanel;
// sublcass objet of JPanel for drawing purposes
private CustomPanel myPanel;
private JButton okButton, exitButton;
public MyChooserColor ()
super( "HOME MADE COLOR COMPONENT; composition of RGB values " );
// setting properties of the mySlider array and registering the events
mySlider = new JSlider [3];
ChangeHandler handler = new ChangeHandler();
for (int i = 0; i < mySlider.length; i++)
{ mySlider[i] = new JSlider( SwingConstants.HORIZONTAL,
0, 255, 255 );
mySlider.setMajorTickSpacing( 10 );
mySlider[i].setPaintTicks( true );
// register events for mySlider[i]
mySlider[i].addChangeListener( handler);
// setting properties of the textField array
textField = new JTextField [3];
for (int i = 0; i < textField.length; i++)
{ textField[i] = new JTextField("100.00%", 5 );
textField[i].setEditable(false);
textField[i].setBackground(Color.white);
// initial Background color of each slider and foreground for each textfield
// accordingly to its current color shade
mySlider[0].setBackground(
new Color ( mySlider[0].getValue(), 0, 0 ) );
textField[0].setForeground(
new Color ( mySlider[0].getValue(), 0, 0 ) );
mySlider[1].setBackground(
new Color ( 0, mySlider[1].getValue(), 0 ) );
textField[1].setForeground(
new Color ( 0, mySlider[1].getValue(), 0 ) );
mySlider[2].setBackground(
new Color ( 0, 0, mySlider[2].getValue() ) );
textField[2].setForeground(
new Color ( 0, 0, mySlider[2].getValue() ) );
// initialize myColor to white
myColor = Color.WHITE;
// instanciate myPanel for drawing purposes
myPanel = new CustomPanel();
myPanel.setBackground(myColor);
// instanciate okButton with its inanymous class
// to handle its related events
okButton = new JButton ("OK");
okButton.setToolTipText("To confirm the current color");
okButton.setMnemonic('o');
okButton.addActionListener(
new ActionListener(){
public void actionPerformed (ActionEvent e)
{ // code permetting to transfer
// the current color to the parent
// component backgroung color
//System.exit( 0 );
// instanciate exitButton with its inanymous class
// to handle its related events
exitButton = new JButton("Exit");
exitButton.setToolTipText("Exit the application");
exitButton.setMnemonic('x');
exitButton.addActionListener(
new ActionListener(){
public void actionPerformed (ActionEvent e)
{ System.exit( 0 );
// define the contentPane
Container c = getContentPane();
c.setLayout( new BorderLayout() );
// panel as container for sliders
mySliderPanel = new JPanel(new BorderLayout());
// panel as container for textFields
textFieldPanel = new JPanel(new FlowLayout());
// panel as container for Jbuttons components
buttonPanel = new JPanel ();
buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.Y_AXIS ) );
//add the Jbutton components to buttonPanel
buttonPanel.add(okButton);
buttonPanel.add(exitButton);
// add the mySlider components to mySliderPanel
mySliderPanel.add(mySlider[0], BorderLayout.NORTH);
mySliderPanel.add(mySlider[1], BorderLayout.CENTER);
mySliderPanel.add(mySlider[2], BorderLayout.SOUTH);
//add the textField components to textFieldPanel
for (int i = 0; i < textField.length; i++){
textFieldPanel.add(textField[i]);
// add the panels to the container c
c.add( mySliderPanel, BorderLayout.NORTH );
c.add( buttonPanel, BorderLayout.WEST);
c.add( textFieldPanel, BorderLayout.SOUTH);
c.add( myPanel, BorderLayout.CENTER );
setSize(500, 300);
show();
// inner class for mySlider events handling
private class ChangeHandler implements ChangeListener {
public void stateChanged( ChangeEvent e )
// start by collecting the current color shade
// for red , forgreen and for blue
setRedColor(mySlider[0].getValue());
setGreenColor(mySlider[1].getValue());
setBlueColor(mySlider[2].getValue());
//The textcolor in myPanel (subclass of JPanel for drawing purposes)
myPanel.setMyTextColor( ( 255 - getRedColor() ),
( 255 - getGreenColor() ), ( 255 - getBlueColor() ) );
//call to repaint() occurs here
myPanel.setThumbSlider1( getRedColor() );
myPanel.setThumbSlider2( getGreenColor() );
myPanel.setThumbSlider3( getBlueColor() );
// display color value in the textFields (%)
DecimalFormat twoDigits = new DecimalFormat ("0.00");
for (int i = 0; i < textField.length; i++){
textField[i].setText("" + twoDigits.format(
100.0* mySlider[i].getValue()/255) + " %") ;
// seting the textcolor for each textField
// and the background color for each slider
textField[0].setForeground(
new Color ( getRedColor(), 0, 0 ) );
mySlider[0].setBackground(
new Color ( getRedColor(), 0, 0) );
textField[1].setForeground(
new Color ( 0, getGreenColor() , 0 ) );
mySlider[1].setBackground(
new Color ( 0, getGreenColor(), 0) );
textField[2].setForeground(
new Color ( 0, 0, getBlueColor() ) );
mySlider[2].setBackground(
new Color ( 0, 0, getBlueColor() ) );
// color of myPanel background
myColor = new Color (getRedColor(),
getGreenColor(), getBlueColor());
myPanel.setBackground(myColor);
// set methods to set the basic color shade
private void setRedColor (int r){
red = ( (r >= 0 && r <= 255) ? r : 255 );
private void setGreenColor (int g){
green = ( (g >= 0 && g <= 255) ? g : 255 );
private void setBlueColor (int b){
blue = ( (b >= 0 && b <= 255) ? b : 255 );
// get methods (return the basic color shade)
private int getRedColor (){
return red ;
private int getGreenColor (){
return green;
private int getBlueColor (){
return blue;
public static Color getMyColor (){
return myColor;
// main method
public static void main (String args []){
MyChooserColor app = new MyChooserColor();
app.addWindowListener(
new WindowAdapter() {
public void windowClosing( WindowEvent e )
{ System.exit( 0 );
// inner class CustomPanel for drawing purposes
private class CustomPanel extends JPanel {
private int thumbSlider1 = 255;
private int thumbSlider2 = 255;
private int thumbSlider3 = 255;
private Color myTextColor;
public void paintComponent( Graphics g )
super.paintComponent( g );
g.setColor(myTextColor);
g.setFont( new Font( "Serif", Font.TRUETYPE_FONT, 12 ) );
DecimalFormat twoDigits = new DecimalFormat ("0.00");
g.drawString( "The RGB values of the current color are : "
+ "( " + thumbSlider1 + " , " + thumbSlider2 + " , "
+ thumbSlider3 + " )", 10, 40);
g.drawString( "The current background color is composed by " +
"the folllowing RGB colors " , 10, 60);
g.drawString( "Percentage of RED from slider1 : "
+ twoDigits.format(thumbSlider1*100.0/255), 10, 80 );
g.drawString( "Percentage of GREEN from slider2 : "
+ twoDigits.format(thumbSlider2*100.0/255), 10, 100 );
g.drawString( "Percentage of BLUE from slider3 : "
+ twoDigits.format(thumbSlider3*100.0/255), 10, 120 );
// call to repaint occurs here
public void setThumbSlider1(int th){
thumbSlider1 = (th >= 0 ? th: 255 );
repaint();
public void setThumbSlider2(int th){
thumbSlider2 = (th >= 0 ? th: 255 );
repaint();
public void setThumbSlider3(int th){
thumbSlider3 = (th >= 0 ? th: 255 );
repaint();
public void setMyTextColor(int r, int g, int b){
myTextColor = new Color(r, g, b);
repaint();
//The following method is used by layout managers
public Dimension getPreferredSize()
{ return new Dimension( 150, 100 );
The following is the code of application that tests the component
//Application used to demonstrating
// the homemade GUI MyChooserColor component
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class ShowMyColor extends JFrame {
private JButton changeColor;
private Color color = Color.lightGray;
private Container c;
MyChooserColor colorComponent;
public ShowMyColor()
{ super( "Using MyChooserColor" );
c = getContentPane();
c.setLayout( new FlowLayout() );
changeColor = new JButton( "Change Color" );
changeColor.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent e )
{ colorComponent = new MyChooserColor ();
colorComponent.show();
color = MyChooserColor.getMyColor();
if ( color == null )
color = Color.lightGray;
c.setBackground( color );
c.repaint();
c.add( changeColor );
setSize( 400, 130 );
show();
public static void main( String args[] )
{ ShowMyColor app = new ShowMyColor();
app.addWindowListener(
new WindowAdapter() {
public void windowClosing( WindowEvent e )
{ System.exit( 0 );Yes, I want help for the missing code to add in actionPerformed method below. As a result, when you confirm the selected color (clicking the OK button), it will be transferred to a variable color of class ShowMyColor.
// instanciate okButton with its inanymous class
// to handle its related events
okButton = new JButton ("OK");
okButton.setToolTipText("To confirm the current color");
okButton.setMnemonic('o');
okButton.addActionListener(
new ActionListener(){
public void actionPerformed (ActionEvent e)
{ // code permetting to transfer
// the current color to the parent
// component backgroung color
//System.exit( 0 );
);
Maybe you are looking for
-
i have photoshop elemnts 10 and i want ti install it> when i start installing it, ever thing go good, but when it start to install Photoshop element10 organizer it stop, then rollback and remove everything? plzzzzzzzzzzzzzz hlep
-
Combining data from multiple tables into report
I'll try my best to describe my issue accurately. I bring in two tables and link them together in my report. First table is a Location table. I create a running total field to summarize the location details in order to to produce total square foota
-
Help me spend 20k on VDI/Virtualization/all-in-one Cluster. What would you do?
I want to buy hardware for VDI, virtualization and general cloud-services. (hardware will be colocated.) I need some help/advice on my current setup; I already have a (semi-succesfull) IT company, I have a customer base, advertising, cashflow, connec
-
Backing up iPhoto 08 library onto External Seagate
I've searched past forums and didn't find an answer so maybe someone can help. All of my photos are stored in my iPhoto library. I back them up onto a Seagate external drive. Typically I back up by plugging in the external then going to Macintosh HD,
-
I have a pop up about Photo stream which does not allow me to click ignore or settings - nothing happens when pressed........I cannot click on anything - the screen seems to have frozen and having tried to turn off I cannot slide to turn off. Please