GUI paint printing
I've got this hard coded line of painted ovals with a simple gui implementation after that.
However I cannot get the line of dots to show on the frame when i open it. The only way it shows on the screen is if i maximise then immediately minimise the screen. how do I get it to show on opening?
PuzzleSolver()
super("Puzzle Solver");
buildGUI();
setSize(300, 300);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public void paint(Graphics g) {
g.fillOval(70, 70, 05, 05); // Nodes
g.fillOval(100, 70, 05, 05);
g.fillOval(130, 70, 05, 05);
g.fillOval(160, 70, 05, 05);
g.fillOval(190, 70, 05, 05);
g.fillOval(220, 70, 05, 05);
private void buildGUI()
/**This button closes the screen and returns the
* user to the message board
JButton c = new JButton("Cancel");
c.addActionListener(
new ActionListener()
public void actionPerformed(ActionEvent e)
System.exit(0);
/** The folowing code is a screen layout for the
* Puzzle Solver screen */
JPanel top = new JPanel();
top.add(new Label("This is your Game Solution. Enjoy!"),
BorderLayout.EAST);
Container pane = getContentPane();
pane.add(top, BorderLayout.NORTH);
JPanel bottom = new JPanel();
pane.add(bottom, BorderLayout.SOUTH);
bottom.add(c,
BorderLayout.EAST);
pane.add(bottom, BorderLayout.SOUTH);
}
Ah you see but if I make it a JPanel I can't access it via the main menu buttons. When it was a panel, (as my other page is) it doesn't open. That's why i made this one a frame.
Thanks a lot for all your help. no more worries I'll jus leave it not showing straight up
Thanks x
Similar Messages
-
After printing, my swing gui takes 3 times as long to update 2d graphics (using paintComponent). Before printing, it updates very quickly, and the slowdown only occurs after printing. Anyone know how to fix this?
Tippity Top
-
Documentation/Tutorials about Report Painter-Printer ?
Hi
Does somebody knows where can i find documents or tutorials about the Report Painter/Report Printer tool ?
Thanks
FrankHi Frank,
I saw your earlier post for Changes a peport created via Report painter. You can do via T/code GRR2.
Please go thru the documantation this will provide you step by step approach on Report painter.
<a href="http://www.virtuosollc.com/PDF/Get_Reporter.pdf">Peport painter</a>
<a href="http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp">Report painter--test report</a>
Need more information please let me know.
Lanka
Ps: Please allocate the points if this answer helps you.
Please close your other post.
Message was edited by: Lanka Murthy -
Hi all,
We have a very strange problem in SAP GUI...seems that the SAP GUI does not refresh its printer list.
A new printer was installed, and old one removed, but when you try to print something.. you see the two printer.
How is that possible?
It seems SAPGUI does not detect the change, or it writes the printer list somewhere, where it has no write access anymore.
Computer restarted - nothing!
Any help will be apreciated
Thank you!
AleHello Alessandra,
the two Access Methods use completely different technologies, therefore you will see a completely different result with Access Method G.
When Access Method G is used, the R/3 printer popup will not show the the frontend printers anymore. Where the printers appeared with Access Method F, the place will be simply empty with Access Method G. This means: it will not be possible anymore to select the frontend printer with 'G' in the R/3 popup (which is shown in your screenshot).
Instead, the frontend printer can be selected with a new popup. After the R/3 printer popup has been confirmed, a new popup will appear. This will be shown by the Windows OS.
This popup should not show the double printer problem. If the double printer problem appears here too, that means something still has not been uninstalled / deleted from the frontend.
The reason is that this new popup is handled by the Windows OS. So if this new popup still shows both printers, Windows needs to be checked why is this so.
Best regards,
Laszlo -
CS3 Annoyances - Shift-Clone/Paint, Printing, Wrong Image onscreen
My environment:
Windows Vista Home Premium, 2GB RAM, 200GB free HDD space, HP Laptop
Adobe Photoshop CS3 (with/without 10.0.1 patch)
Epson Stylus Pro 4800 via TCP/IP connection
I am still having the following three problems:
1. When holding down the shift key and clicking near the edge of the screen with a paint/clone/repair brush, the screen jumps to another area of the image (light years away it seems) - PS7 and CS2 moved a fraction of an inch in comparison.
2. When printing to the Epson Stylus Pro 4800, no matter how many copies I indicate that I want, I'll inevitably get more...sometimes many more. From my other PC, a dual P3 with 4GB of RAM running Win2KPro and PSCS2, this does not happen (using same file).
3. If I close a file that is showing full-window (not necessarily full-screen), and another image is still waiting to be worked on in the background, the full-window image does not change when the file closes, but the navigator version of the image changes to the next image waiting in the background. I have to resize the window to force a rewrite of the screen with the correct image.
I am patiently waiting for fixes/workarounds to these issues - any suggestions are greatly appreciated.I can't believe there isn't another person experiencing these same problems... is there another place to look for "known issues" with CS3 and the other versions of Photoshop?
-
In my program, I have a "show" function that will remove all the contents of a JPanel and replace it with new or existing components (JPanels, JTextFields, etc...). My problem is that sometimes everything will get displayed fine and sometimes the scroll bars and other components will get painted incorrectly. What I mean by this is that there will be remnants of other components partially displayed randomly on the dialog. For instance, half a button will show up ontop of the horizontal scrollbar, when a button was never there in the first place. However, when the mouse rolls over the scrollbar, it will get refreshed properly and the half-button will disappear. I see this in other places as well, but this section of code seems the easiest to analyze. I've tried every sort of combination of revalidate(), repaint(), paintAll() that i can think of and nothing has worked. If my explaination is unclear, I have an image that will show what I'm talking about, but I'm unsure of how to post images in this forum.
Here's my code:
void show() {
if (library.release.isEmpty()) {
library.window.LL_LibRelease.setText("Release: N/A");
} else {
library.window.LL_LibRelease.setText("Release: " + library.release);
//Settings panel that will get the new/existing components
JPanel settings = library.window.PL_Settings;
//ScrollPane that the settings panel is found in.
JScrollPane pane = library.window.SP_Settings;
//Panel that the ScrollPane is placed in. Used so that I can have a titled border around the ScrollPane.
JPanel outer = library.window.PL_Settings_Outer;
//Panel that hold everything in my dialog.
JPanel all = library.window.programPanel;
//Dialog window.
JDialog dialog = library.window.programDialog;
//Gets the current component that owns the input focus
Component owner = recurseGetOwner(settings);
//Removes everything from the settings panel
settings.removeAll();
//Places new and existing components into the panel
recurseShow(settings, null, null, program);
//Gives the old component focus again.
if (owner != null) {
owner.requestFocusInWindow();
/*** Need some kind of repaint here... ***/
// This doesn't really work, but it works more often than the other stuff I've tried.
settings.revalidate();
pane.revalidate();
dialog.paintAll(dialog.getGraphics());
Thanks in advance!Thanks, I will give that a try if no other options are available. However, that will take a lot of restructuring of my code. Also, it will run differently, because now I'll have to disable to components I don't want instead of simply not adding them back in.
Also, that won't help the other section of my code where this is happening. It also happens with this code:
public void updateScript(int ndx, ProgramDefinition pd) {
if (ndx < 0) {
//Add a new program and a new row to the JTable
ProgramInstance pinst = new ProgramInstance(pd);
pinst.setValues();
DefaultTableModel model = (DefaultTableModel) window.TB_Script.getModel();
ndx = model.getRowCount();
JPanel pl = new JPanel();
pl.setLayout(new GridBagLayout() );
pl.add(new JButton("Edit"));
JTextArea ta = new JTextArea(pd.wordWrap(pinst.toString(), maxChars));
ta.setFont(window.TB_Script.getFont());
model.addRow(new Object[]{pinst.definition.program.name, ta, pl});
programs.add(pinst);
toRun.add(true);
} else {
//Edit the program in the row.
programs.get(ndx).setValues();
((JTextArea) window.TB_Script.getModel().getValueAt(ndx, 1)).setText(pd.wordWrap(programs.get(ndx).toString(), maxChars));
window.TB_Script.setRowHeight(ndx, ((JTextArea)window.TB_Script.getModel().getValueAt(ndx, 1)).getPreferredSize().height);
if(!programs.isEmpty()){
window.BTN_Run.setEnabled(true);
window.BTN_Save.setEnabled(true);
/*** Need some kind of repaint here... ***/
// This doesn't really work, but it works more often than the other stuff I've tried.
window.TB_Script.revalidate();
window.SP_Script.revalidate();
window.getFrame().paintAll(window.getFrame().getGraphics());
}Thanks! -
Why can't I print anymore after updating to 10.6.8?
I can of course not be certain that the update caused the issues I am about to describe but I haven't done any other changes to the computer. It's not a toy where I experiment, it's just for work so that update is the only major change I've had done to it.
In the GUI the printer just pauses over and over, you can't unpause it because it'll just pause again. I've tried removing it, it's easy to find in the office network so I just add it again as a plain old postscript printer which worked fine until now.
I've also tried changing the kernel boot architecture to see if it would make a difference but it hasn't, I left it at x86_64.
Here's the crash log that is referenced from system.log.
Process: ipp [275]
Path: /usr/libexec/cups/backend/ipp
Identifier: ipp
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: cupsd [201]
Date/Time: 2011-06-29 15:02:59.264 +0200
OS Version: Mac OS X 10.6.8 (10K540)
Report Version: 6
Exception Type: EXC_ARITHMETIC (SIGFPE)
Exception Codes: EXC_I386_DIV (divide by zero)
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ipp 0x00000001e36cc59c 0x1e36c7000 + 21916
1 ipp 0x00000001e36cb70f 0x1e36c7000 + 18191
2 ipp 0x00000001e36c8874 0x1e36c7000 + 6260
3 ipp 0x00000001e36c7b88 0x1e36c7000 + 2952
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00000001e36d1e40 rcx: 0x000000000000ffc8 rdx: 0x0000000000000000
rdi: 0xffffffffffffffff rsi: 0x00007fff5fbe9424 rbp: 0x00007fff5fbf2e90 rsp: 0x00007fff5fbe9750
r8: 0x0000000000000002 r9: 0x0000000000000000 r10: 0x00000001e36cd08c r11: 0x00007fff5fbf2c59
r12: 0x00007fff5fbf2c73 r13: 0x000000000000000c r14: 0x0000000000000000 r15: 0x00000001001093c8
rip: 0x00000001e36cc59c rfl: 0x0000000000010246 cr2: 0x000000011fc87b78
Binary Images:
0x1e36c7000 - 0x1e36ceff7 ipp ??? (???) <23A8CF15-5507-090E-DDD6-0916533E9F1E> /usr/libexec/cups/backend/ipp
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <69130DA3-7CB3-54C8-ABC5-423DECDD2AF7> /usr/lib/dyld
0x7fff81269000 - 0x7fff81319fff edu.mit.Kerberos 6.5.11 (6.5.11) <085D80F5-C9DC-E252-C21B-03295E660C91> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff82c04000 - 0x7fff82e8dff7 com.apple.security 6.1.2 (55002) <4419AFFC-DAE7-873E-6A7D-5C9A5A4497A6> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff82f3c000 - 0x7fff82f5dfff libresolv.9.dylib 41.0.0 (compatibility 1.0.0) <9F322F47-0584-CB7D-5B73-9EBD670851CD> /usr/lib/libresolv.9.dylib
0x7fff83256000 - 0x7fff832d3fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib
0x7fff8379d000 - 0x7fff83856fff libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <2C5ED312-E646-9ADE-73A9-6199A2A43150> /usr/lib/libsqlite3.dylib
0x7fff85686000 - 0x7fff85697ff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <97019C74-161A-3488-41EC-A6CA8738418C> /usr/lib/libz.1.dylib
0x7fff86ac4000 - 0x7fff86b05fff com.apple.SystemConfiguration 1.10.8 (1.10.2) <78D48D27-A9C4-62CA-2803-D0BBED82855A> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff86d2e000 - 0x7fff86d32ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff86fde000 - 0x7fff8702afff libauto.dylib ??? (???) <F7221B46-DC4F-3153-CE61-7F52C8C293CF> /usr/lib/libauto.dylib
0x7fff8702b000 - 0x7fff871a2fe7 com.apple.CoreFoundation 6.6.5 (550.43) <31A1C118-AD96-0A11-8BDF-BD55B9940EDC> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8751e000 - 0x7fff876dffef libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib
0x7fff8787c000 - 0x7fff87a3afff libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <4274FC73-A257-3A56-4293-5968F3428854> /usr/lib/libicucore.A.dylib
0x7fff87ea7000 - 0x7fff87f5dff7 libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <03140531-3B2D-1EBA-DA7F-E12CC8F63969> /usr/lib/libobjc.A.dylib
0x7fff88b12000 - 0x7fff88b4cfff libcups.2.dylib 2.8.0 (compatibility 2.0.0) <7982734A-B66B-44AA-DEEC-364D2C10009B> /usr/lib/libcups.2.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylibI think that it's probably something in the update because other people have been having this problem also. Here's one discussion I found and it might help https://discussions.apple.com/message/15509158 . Try using google and see if you can find an answer.
Chris -
Maybe this is not the appropriate section.. My problem is that I'm trying to realize a desktop application connected to a database, which should be able to manage data by GUIs and print report if it's necessary. For the first part everything's ok, but I've a few question about the second.. watching around I found some examples of classes that implement Printable which can be the answer of my question, but..
- is possible to create a report with a Printable class and then save it into a .pdf? and/or other formats?
Anyway, am I right in this or did I try something wrong?You can create a PDF file using the [itext |http://www.lowagie.com/iText/] library
you can create reports using jasperreports
you can print the reports and save them as PDF,EXCEL ,HTML and more...
(jasperreports is using the [itext |http://www.lowagie.com/iText/] library )
you can edit your reports using ireport
hope that helps -
How to set the CR print job name that displayed in Printer job queue?
As following image shows, when I press the Print button in Crystal Report Preview GUI,
a print job is sent to Windows Printer Spool.
[Windows Printer queue dialog snapshot|http://www.box.net/shared/96vq4qa2mp]
The "Document Name" in the dialog is like "Crystal Reports - temp_214d9d11-a73f-4872-81f6-b8a63bf0a6b9.rpt".
I want to know which property of Crystal Reports can be used to set the print job name to a more meaningful one.
Edited by: Xiaobing Sun on Apr 2, 2009 5:08 AMThe solution in this thread is for VS .NET as this is the forum for CR in .NET.
With Foxpro, I suspect you want to create a new thread in the SAP Crystal Reports - Legacy SDKs forum.
Make sure you specify the exact version of CR used.
- Ludek -
Printing Shop Papers for Completed Notifications
Hello,
This issue has been brought up on this forum before, but I have not managed to find an actual solution that was implemented by an organization.
We are basically trying to print Shop Papers for completed (NOCO) Notifications that have Orders assigned but that have been completed and TECOu2019d. The thread Need to REPRINT the Service Notification explains that it is not possible to print such shop papers. Is there some way to create a work around using user exits or a custom program to enable such shop papers to be printed? I've already checked with SAP and was told that no SAP note fulfills this requirement on ECC 6.0. I would much appreciate any insight on a solution you may have implemented.
Thanks in advance,
TarunPeteA is right you will need to have some custom code to by-pass the status checks that SAP has implemented.
Prometheus Group has a program called the Work Order Print Manager that can do this for work orders. I am a developer for this solution.
The program gathers all document related to the work order (services for objects, DMS, sapscripts/smartforms, equipment doc, functional location docs, material docs, etc) and puts them into a nice GUI for printing.
Specifically for work order you cannot print them from standard SAP if the order is in created status because the menu is greyed out). However we can put a button in a user exit to call the program. The sapscripts appear along with the other documents and can be printed.
Additionally we can add watermarks and/or to the document to let the users know they are trying to print a work order in the incorrect status. We/ I can demonstrate the work order solution to you and prototype a IW52 solution after a short discussion to help us understand your issue in particular.
http://prometheusgroup.us/wopm.php
if you are interested in a demo email them to set up a demonstration with me.
Edited by: Tim Huang on Mar 17, 2010 1:14 PM
Edited by: Tim Huang on Mar 17, 2010 1:20 PMv -
Preview wont save printing presets 10.5.8
Action: When viewing a Photo and or PDF in preview. this is the standard below.
I wish to change the Presets to hold the changes as seen below.
When i go back to use my preset it looks like this and the printed paper is not my preset.
I am Working on MacPro intel running 10.5.8 fully updated. and the issue seems to follow
suit with whatever program uses the Preview GUI to print. If this is a known issue can you please show me the link
that a bug report was submitted and that someone is indeed looking into it. we have a very large system using only mac's
and this is a very big issue for what we use the macs for here.
thank you in advance
AtticusSeems all that info is held in this file below.
Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, move this file to the Desktop for now...
/Users/yourUserName/Library/Preferences/com.apple.print.custompresets.plist
reboot & try setting up the Presets again.
Mine works here in 10.5.8 on PPC G5. -
How can I list print queues per server via power shell script
Hello,
we are managing many print servers on our domain environment, now for auditing purpose I need to report print queues per server, and it seems bit difficult task doing it via GUI in print management view, could someone help me with script which
gets me the no. of print queues on each print server.
Also I need to list all the print drivers installed on each print servers.
I tried to list the drivers " Get-WmiObject win32_printerDriver -filter " but this will get me complete information about the driver, I need to list only the driver name (-filter) either _RELPATH or _PATH
dibuYou can also use WMI like this:
(get-WmiObject win32_printer -computer ws702).count
I don't understand what you mean by list only. Just select what you need.
See: http://technet.microsoft.com/en-us/scriptcenter/dd742419
That will give you some basic background on how to use PowerShell to get the properties of objects.
¯\_(ツ)_/¯ -
Handle print function in standard report
Hi,
Is it possible to handle print event in standard report ? I made my own status-gui with print button activated (assigned function code), added in code:
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'PRN'.
PERFORM my_prn_control.
ENDCASE.
but, when I press print button in report, at-user-command section isn't triggered :/strange... after few restarting of abab probram sy-ucomm cointains correct assigned value
-
JLabel not updating text in GUI
i've spent about an hour trying to get my label to update from another class. i set the label to public and i tried to invoke setText() on it from the other class, but it doesnt change it in the GUI. i printed the getText() method of the label and it's identical to what i tried to set it to be, but it just isnt displaying the correct text.
i know to update in the GUI it needs to repaint itself, but this is automatic for setText() and it is working for the local calls to setText().
i have a method
public void setStatus(String text)
status.setText(text);
}that should do exactly what i want, but it only works when called from its own class..... HELPhey,
just a little example...
//first little class with the label in it! and a getter for the label.
public class LabelPanel extends JFrame {
private static JLabel label;
public LabelPanel(){
initGUI();
private void initGUI() {
label = new JLabel("old text");
JPanel panel = new JPanel();
ButtonPanel buttonPanel = new ButtonPanel();
panel.add(buttonPanel.getPane());
panel.add(label);
setContentPane(panel);
public static void main(String[] args)
// Schedule a job for the event-dispatching thread:
// creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
* Create the GUI and show it.
private static void createAndShowGUI() {
// Create and set up the window.
JFrame frame = new LabelPanel();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("test");
// Display the window.
frame.pack();
frame.setVisible(true);
// gets the label
public static JLabel getLabel() {
return label;
//second class just a button that changes the label
public class ButtonPanel implements ActionListener{
private JPanel pane;
private JButton button;
public ButtonPanel(){
init();
private void init(){
button = new JButton("change");
button.addActionListener(this);
pane = new JPanel();
pane.add(button);
public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
if(cmd.equals("change")){
button.setText("done");
//get the label and set the new text
LabelPanel.getLabel().setText("new text");
}else if(cmd.equals("done")){
button.setText("change");
//get the label and set the new text
LabelPanel.getLabel().setText("old Text");
public JPanel getPane() {
return pane;
}hope that helps!!! :) -
Printer config problem? Please help
I am trying to print one of my paintings on Epson Workforce 1100. I'm using PSE10 and print size is 12X16. The painting printed very well just before Christmas and now, when I need to print more, it will not print correctly. The image itself has lost a lot of contrast and the background (of the print) that shows solid black on the monitor prints an ugly maroon. I've done every troubleshoot suggested by Epson and the test pages tell me the printer is working properly. Does anyone have any idea about what I'm doing wrong? Is it a software or set up problem?
Thanks for your help,
RalphThe "Do Not Disconnect" screen will continue to stay displayed on your iPod, simply because you either have Disk Use enabled, or you are manually managing your iPod's songs.
If you are automatically syncing songs to your iPod, then disable disk use.
For more info, see this:
Enabling Disk Use for iPod
If you are manually managing your iPod's songs, then you will have to eject it from your computer before unplugging it to make it safe to disconnect.
For details on safely disconnecting an iPod, see this:
Safely Disconnect iPod
-Kylene
Maybe you are looking for
-
1. I have a basic MacBook. 2. I'm running Mac OS X Version 10.6.8. 3. Under Firefox, I have my preference settings set on "When Firefox starts 'show my windows and tabs from last time'." 4. I have privacy settings set to "Tell websites I do not want
-
Brand new user account, same old name
I've been having some quirky behavior with the main account on my Powerbook. Most recently I purchased and installed Speed Download, only to find that it unexpectedly quits after just a few minutes of an FTP download. I can run it in a new account wi
-
Error During Install Oracle Application Server middle tier
Hi all! When I install Business Intelligence and Forms, I get error when Portal Configuration Assistant: STEP 3: STEP 3 : Populating Portal seed in OID Creating/Modifying Directory Provisioning Profiles in OID Subscriber: dc=thanhba,dc=com INSTALL_ER
-
Implementi​ng Windows API Shell Execute call
I am trying to implement the Windows API call in LabVIEW named ShellExecute. I have created the attached VI and I do not understand why it will not run correctly. I am hoping that a user on the forum will see the problem and be able to suggest what
-
Best way to break up audio files for Captivate?
Hi guys, I have a dilemma here. I am getting ready to record the audio clilps for Captivate and I'm wondering how I should break up the audio. For example, the first slide has First textbox with title "Introduction" Second textbox with title "Learni