Help automate popup code
i have popup codes like this (too many around 12-20 popup screens) painted for demo.
most of them have a kind of 1-2 layout ie
the fields come dynamically from a resultset
i am guessing i can change the SQL code so that i can get the proper field names
eg
SELECT
FIELD1 AS DisplayName1,
FIELD2 AD DisplayName2
is there a way to dynamically adjust the layout to set the fields in a good way according to the recordset returned.
| Label1: Field1 |
| Label1: Field1 |
| Label1: Field1 |
| Label1: Field1 |
| OK Cancel |
package com.samples.swingsamples;
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
public class clsClaimsEDI extends JDialog
public clsClaimsEDI( JFrame frame ) {
super( frame, true );
setTitle( "EDI Information" );
setSize( 500, 300 );
// Creates a panel to hold all components
JPanel panel = new JPanel( new BorderLayout() );
panel.setLayout( new GridBagLayout() );
// give the panel a border gap of 5 pixels
panel.setBorder( new EmptyBorder( new Insets( 5, 5, 5, 5 ) ) );
getContentPane().add( BorderLayout.NORTH, panel );
GridBagConstraints c = new GridBagConstraints();
// Define preferred sizes for input fields
Dimension shortField = new Dimension( 40, 20 );
Dimension mediumField = new Dimension( 120, 20 );
Dimension longField = new Dimension( 240, 20 );
Dimension hugeField = new Dimension( 240, 80 );
// Spacing between label and field
EmptyBorder border = new EmptyBorder( new Insets( 0, 0, 0, 10 ) );
EmptyBorder border1 = new EmptyBorder( new Insets( 0, 20, 0, 10 ) );
// add space around all components to avoid clutter
c.insets = new Insets( 2, 2, 2, 2 );
// anchor all components WEST
c.anchor = GridBagConstraints.WEST;
JLabel lbl1 = new JLabel( "Claim ID" );
lbl1.setBorder( border ); // add some space to the right
panel.add( lbl1, c );
JTextField txt1 = new JTextField();
txt1.setPreferredSize( longField );
c.gridx = 1;
c.weightx = 1.0; // use all available horizontal space
c.gridwidth = 3; // spans across 3 columns
c.fill = GridBagConstraints.HORIZONTAL; // fills the 3 columns
panel.add( txt1, c );
JLabel lbl2 = new JLabel( "External Reference Number" );
lbl2.setBorder( border );
c.gridwidth = 1;
c.gridx = 0;
c.gridy = 1;;
c.weightx = 0.0; // do not use any extra horizontal space
panel.add( lbl2, c );
JTextField txt2 = new JTextField();
txt2.setPreferredSize( mediumField );
c.gridx = 1;
c.ipadx = 0; // reset the padding to 0
c.ipady = 0;
c.weightx = 1.0; // use all available horizontal space
// c.weighty = 1.0; // use all available vertical space
c.gridwidth = 3; // span across 3 columns
// c.gridheight = 1; // span across 2 rows
c.fill = GridBagConstraints.HORIZONTAL; // fills the cols & rows
panel.add( txt2, c );
JLabel lbl3 = new JLabel( "Trading Partner" );
lbl3.setBorder( border );
c.gridx = 0;
c.gridy = 3;
c.gridwidth = 1;
c.gridheight = 1;
c.weightx = 0.0;
c.weighty = 0.0;
c.fill = GridBagConstraints.NONE;
panel.add( lbl3, c );
JTextField txt3 = new JTextField();
txt3.setPreferredSize( mediumField);
c.gridx = 1;
c.gridwidth = 3; // span across 3 columns
c.gridheight = 1; // span across 2 rows
c.fill = GridBagConstraints.BOTH; // fills the cols & rows
panel.add( txt3, c );
c.gridx = 2;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 3;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 0;
c.gridy = 4;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 1;
c.gridwidth = 3;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 0;
c.gridy = 5;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 1;
c.gridwidth = 3;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 0;
c.gridy = 6;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 1;
c.gridwidth = 3;
panel.add( Box.createVerticalStrut(1), c);
c.gridx = 0;
c.gridy = 7;
c.gridwidth = 1;
panel.add( Box.createVerticalStrut(1), c );
c.gridx = 1;
c.gridwidth = 3;
panel.add( Box.createVerticalStrut(1), c );
JButton submitBtn = new JButton( "Close" );
c.gridx = 4;
c.gridy = 0;
c.gridwidth = 1;
c.fill = GridBagConstraints.HORIZONTAL;
panel.add( submitBtn, c );
JButton cancelBtn = new JButton( "Help" );
c.gridx = 4;
c.gridy = 0;
c.gridwidth = 1;
c.fill = GridBagConstraints.HORIZONTAL;
panel.add( cancelBtn, c );
JButton helpBtn = new JButton( "Help" );
c.gridy = 1;
c.anchor = GridBagConstraints.NORTH; // anchor north
panel.add( helpBtn, c );
setVisible( true );
any other popup samples :))
Similar Messages
-
Automatic popup for reason of rej after an async method
Hello,
How to get a reason of rejection popup after an asynchronous method?
Currently I am using the standard singlerelease method of object type BUS2012 for the release of purchase order. Now once this order gets rejected the user wants an <b>automatic popup for entering the reason for rejection</b> and NOT as another workitem in his inbox for execution.
Please let me know how can I provide this functionality in the current scenario. <b>Also since the Previous method(singlerelease) is asynchronous Advance with Dialog does not work.</b>
Thanks and Regards,
AnujIt does not work for asynchronous methods but works for synchronous methods. As per SAP the advance with immediate dialog should work for asynchronous methods as well.
Below is an excerpt from SAP help.
At runtime, after completion of a step, (= work item has status completed), the workflow system checks the following properties of the subsequent work item:
Is it a dialog work item?
Does the corresponding task refer to a synchronous method?
Is the indicator Advance with dialog set?
Is the actual agent also a recipient of this work item?
Has the work item reached all of its requested starts?
If the answer to all these questions is yes, the workflow system automatically starts execution of the work item.
May be you should write a message to SAP. In the meanwhile you can create a synchronous method for the business object.
-Kiran -
Need help with WMI code that will send output to db
'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
and talks to our server. I also want the code to:
* check the users computer and find all installed patches
* the date the patches were installed
* the serial number of the users computer
* the computer name, os version, last boot up time, and mac address
and then have all this output to a database file. At the command prompt I've tried:
wmic qfe get description, hotfixid
This does return the patch information I'm looking for, but how do I combine that line of code with:
wmic os get version, csname, serialnumber, lastbootuptime
and
wmic nicconfig get macaddress
and then get all this to output to a database file?Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
found lots of good information. I also found a good command that will print information to a text file.
Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
updates enable, that's because we are not allowed to.
This is my code so far.
#if you want the computer name, use this command
get-content env:computername
$computer = get-content env:computername
#list of installed patches
Get-Hotfix -ComputerName $computer#create a text file listing this information
Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)? -
Can you help me to update my phone settings..
Do we have option to avoid the automatic popup to download the photos/videos from iphone, once we connect to the Laptop/Desktop
Thanks
UdayThat is a Windows option - not a phone option. You need to modify your Autoplay options on your PC
-
Diff b/n search help and match code
hi all,
can i know the differece between search help and match code object in terms of functionality?
is there possibility to provide matchcode object for select-options?if yes how can we provide?<b>same thread again.</b>
hi,
Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.
Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.
A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:
You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.
You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.
Search Help
Use
With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
Prerequisites
You can call this function by:
· Selecting Object ® Search... () in the main menu bar of the Integration Builder
· Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)
In this case the software component version is defined as the search criteria.
Features
Defining the Object Type
You can select the object type in a dropdown list in field Object Type.
In the design (Integration Repository) you can
· Select an object type (for example Message Interface)
· Select a cross-object category (for example Interface Objects)
In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.
CHECK THIS LINK TO CREATE A SEARCH HELP.
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
CHECK THIS LINK TO CREATE A MATCHCODE OBJECT
http://searchsap.techtarget.com/tip/1,289483,sid21_gci553386,00.html
more details...
Here is the code to attach a search help to a select-options
SELECT-OPTIONS S_MATNR FOR MARA-MATNR MATCHCODE OBJECT MAT1_A.
Rgds
Anver -
Search help for material code in VA01
Dear Experts,
In VA01 tcode in item level if user press f4 in the material code then we will get all the f4 helps for few fields.Now i need to add one more field mtart from mara table in the existing search help of material code.
plz suggest me how can i proceed.
If u have any documets regarding adding one more fied to existing search help plz send me.
Thanks & Regards,
farook.
Edited by: farook shaik on Aug 18, 2009 8:58 AMHi,
You can do that using search help exits you would find several threads already posted to the forum for this like below:
Link[Search Help Exits|Search Help Exit;
Regards,
Himanshu -
Help with html code - inserting video into Muse
I am seeking help writing the code to insert a video into Muse. I uploaded video into my Business Catalyst hosting. I need it to autoplay, loop and not show any controls or frames.
When I host video on Vimeo or YouTube, I see markings on the video that is why I am trying to just host in the same place that the files are stored for my website. If there is a way to host on youtube with out any markings showing up on the video I would be open to that too.
I don't want to see any play button or time bar.
Thanks in advance!!Hello,
Just as an FYI - we also have an HTML5 video tool over at MuseThemes.com that achieves this, but works on mobile devices as well. The link above looks like it uses Flash, which isn't common anymore since the release of HTML5 based video.
Simply drag the widget out onto your canvas, and link up your videos / set options like loop, controls visible, etc. It's quite a flexible widget, and there's a complete training video included so you don't get stuck
Check out the widget here
Just wanted to provide another alternative that could be helpful. Cheers!
Steve Harris
MuseThemes.com -
Need help in transcation code ime0
I need help in transaction code ime0. I mean to say what is this TCode doing? What different Drill-down program means? Where I can use this report?
Regards,
SubhasishHi
Please check the link for help
<a href="http://help.sap.com/saphelp_47x200/helpdata/EN/5c/8db33f555411d189660000e829fbbd/frameset.htm">CA - Drilldown Reporting</a>
Hope it helps
Anirban -
Automatic popup for reason of rejection after async method
Hello,
How to get a <b>reason of rejection</b> popup after an asynchronous method?
Currently I am using the standard <b>singlerelease</b> method of object type BUS2012 for the release of purchase order.
Now once this order gets rejected the user wants an automatic popup for entering the reason for rejection and NOT as another workitem in his inbox for execution.
Please let me know how can I provide this functionality in the current scenario. Also since the Previous method(singlerelease) is asynchronous Advance with Dialog does not work.
Thanks and Regards,
AnujHi Mikko/Anuj,
Added to the FAQ, including techo details.
Cheers,
Mike
3.16. How can I 'advance in dialog' with asynchronous tasks?
This is unfortunately not possible as the very nature of <i>asynchronous</i> tasks contradicts the idea of 'advance in dialog', also known as <i>synchronous</i> dialog chains. The two main reasons for using asynch tasks are either that the termination can happen outside of WF, or to ensure that all database updates are complete. Both of these imply that there is an action happening outside of workflow (database updates can happen outside the user session after the transaction is completed). Since these happen outside the current dialog session, one would have to 'continue' another user's session in the current dialog, which is not possible.
How it works on a more technical level:
Asynchronous tasks use terminating events which live in the instance linkage tables (tx SWEINST). You don't normally have to touch instance linkages, the WF system creates these as necessary, and deletes it when a task completes.
The main difference between instance and type linkages is that instance linkages have a key and are specific to one instance (hence the name), they are only triggered for the object with the same key. Like any other event they are passed on to the event manager who triggers the receiver (the task completion in this case) via RFC (user WF-BATCH). This is why it is theoretically impossible to advance in dialog - because the task completion happens in a separate dialog under a different user, quite possibly on a different server.
Workarounds can include secondary methods (though they have their own restrictions), or redesigning your flow so that it uses a synchronous task instead e.g. by using a wait for event in a separate branch or creating a synchronous task instead. -
Automatic tax code determination for service POs
Hi
Can anyone tell about the possibilities of automatic tax code determination for the service purchase orders.
Thanks in advance
DuraiThe tax indicator is used in the automatic determination of the tax code
in Purchasing.
The tax code can be determined automatically within the framework of tax
determination (via the conditions).
Tax indicators, which can come from the service master record,
Customizing, or the purchasing document, are used in this process. The
system determines the tax code on the basis of the combination of these
tax indicators.
Automatic determination of the tax code is useful, for example, if
different tax rates apply to different groups of services. -
Search help and Match code oject
How to create the search help in version 5.0 and 6.0 ? what is elementary search help,collective search help? what is the use of these search helps? where we use elementary and collective searsc helps? what is the difference between searc help and match code object? how to use in reports?where we use search help and F4IF_INT_TABLE_VALUE_REQUEST function module? what is the diffference between them?
Hi Rk,
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
CREATION:
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
See the links:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Search Help Exits:
Re: dynamic values for search help
Re: Dynamic search help
Thanks,
Reward If Helpful. -
Can you help with the code to publish Flash to my own domain.
Thank you for your help, I publish the my site to my own domain, I do not use .Mac, I tested your code and ity works well on .Mac, can you help with the code to publish to my own domain.
Thank you againYou appear to have just collected a variety of code snippets and thrown them together, including a section of AS2 code ( gage.onRelease = function() {... )
The suggestion I offered yesterday still stands. You should find a tutorial regarding AS3 and the atan2 function. Beyond that, what you show suggests this is a school assignment. You should seek help from your fellow students and instructor if that is the case. -
My macbook pro intel core duo 2 keeps restarting intermittenly. Help with error code.
I have run a Hardware Test, and it gives the follwing error code. Can anyone tell me what this is? I recently had my logic board replaced within the last 3 months, so it shouldn't be a problem there.
Thank you very much for any and all help.
Error code:
4SNS/I/40000000:TGOH-128.00Online references possible memory issue? Sensors?
https://discussions.apple.com/thread/3140607?start=0&tstart=0
Keep taking it back and they keep switching parts until the problem is gone. -
I need help with this code error "unreachable statement"
the error_
F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
int index;
^
F:\Java\Projects\Tools.java:71: missing return statement
}//end delete method
^
F:\Java\Projects\Tools.java:86: missing return statement
}//end getrecod
^
3 errors
import java.util.*;
import javax.swing.*;
import java.awt.*;
public class Tools//tool class
private int numberOfToolItems;
private ToolItems[] toolArray = new ToolItems[10];
public Tools()//array of tool
numberOfToolItems = 0;
for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
toolArray[i] = new ToolItems();
}//end for loop
}//end of array of tools
public int search(int id)//search mehtod
int index = 0;
while (index < numberOfToolItems)//while and if loop search
if(toolArray[index].getID() == id)
return index;
else
index ++;
}//en while and if loop
return -1;
}//end search method
public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
if(numberOfToolItems >= toolArray.length)
return 0;
int index;
index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
if (index == -1)
toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
numberInStock ++;
return 1;
}//end if index
}//end if toolitem array
return -1;
}//end insert method
public int delete(/*int id*/)//delete method
}//end delete method
public void display()//display method
for(int i = 0; i < numberOfToolItems; i++)
//toolArray.display(g,y,x);
}//end display method
public String getRecord(int i)//get record method
// return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
}//end getrecod
}//end class
Edited by: ladsoftware on Oct 9, 2009 6:08 AM
Edited by: ladsoftware on Oct 9, 2009 6:09 AM
Edited by: ladsoftware on Oct 9, 2009 6:10 AM
Edited by: ladsoftware on Oct 9, 2009 6:11 AMladsoftware wrote:
Subject: Re: I need help with this code error "unreachable statement"
F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
int index;
^
F:\Java\Projects\Tools.java:71: missing return statement
}//end delete method
^
F:\Java\Projects\Tools.java:86: missing return statement
}//end getrecod
^
3 errorsThe compiler is telling you exactly what the problems are:
public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
if(numberOfToolItems >= toolArray.length)
return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
int index;
index = search(id); //< -----------------------------------------------------------------------------------------------------------------HERE
if (index == -1)
toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
numberInStock ++;
return 1;
}//end if index
}//end if toolitem array
return -1;
}//end insert method
public int delete(/*int id*/)//delete method
// <<== HERE where is the return statement?
}//end delete method
public String getRecord(int i)//get record method
// return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
}//end getrecod
}//end class -
Install Flex 4
Exit Code: 7
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 3 error(s), 1 warning(s)
WARNING: Memory requirements not met for {74EF259F-1DC6-4DEE-866B-0707173D7654}
ERROR: Custom Action for payload {74EF259F-1DC6-4DEE-866B-0707173D7654} Adobe Flash Builder returned error. Failing this payload.
ERROR: The following payload errors were found during install:
ERROR: - Adobe Flash Builder: Install failed
My Pc
Pentium D CPU 2.80GHz, 2.80GHz
992 MB in RAM
HDD: 38.0GB, Used: 23.3GB, Free: 14.7GB
Sistem
Microsoft Windows XP Pro.
Ver. 2002
Service Pack 3
Help to install tehe Flex Build 4, plase.Hi,
I had a similar problem (see error details below) installing on Windows 7 Professional using a domain account which is in the local admin group. I think my problem was due to an @ character in one of the following environment variables:
APPDATA=C:\Users\my_username@my_company.com\AppData\Roaming
HOMEPATH=\Users\my_username@my_company.com
LOCALAPPDATA=C:\Users\my_username@my_company.com\AppData\Local
USERPROFILE=C:\Users\my_username@my_company.com
I solved the problem by creating a local account with a plalin alphabetical username, adding it to the local administrator group and re-running the installer under that account by right clicking and selecting "Run as Administrator".
I got this idea from the following blog posts:
http://www.niallodoherty.com/post.cfm/adobe-flash-builder-4-installation-error-exit-code-7
http://www.joebillman.com/blog/2010/04/flash-builder-4-install-error/
Hope that helps,
Carl
Exit Code: 7
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 4 error(s), 0 warning(s)
ERROR: Custom Action for payload {74EF259F-1DC6-4DEE-866B-0707173D7654} Adobe Flash Builder returned error. Failing this payload.
ERROR: The following payload errors were found during install:
ERROR: - Adobe Flash Builder: Install failed
ERROR: - Adobe Flash Player 10 ActiveX: Install failed
Maybe you are looking for
-
How can i block a vendor for Down payment? Both f-47, f-48 and automatic f100 should not work for this vendor. please tell me the settings Thanks in Advance.
-
Is there a way to create/edit registry keys with Java?
I'm writing a console app and I'd like to have it so the users can change values in the registry. I'm not just talking about app keys I want any key. Is there a way to do this with Java?
-
Trouble with Dreamweaver Mx 6.1
I wonder if anybody can help me.Dreamweaver freezing. Sometimes I manage to connect to server and load 1 file, after it just freezes. After that happens I cannot even connect to server. When I do a test connection from the edit box it connects, so I
-
J2EE with JDeveloper and postgresql
Hi folks, I'm creating a j2ee app (struts) with jdev with oracle9i and this work fine... but I have try connect with another database (postgresql 7.4) to recovery some data and the local container of jdev is not recognizing the postgresql driver... w
-
What are the GL Accounts are grouped under value field "VV100 " in COPA
Hi All, Can some body explain me what are the GL Accounts and how many GL Accounts are grouped / maintained under the Value field (VV100). Thanks in advance, B Venu-gopal