Enabling Double-buffer in JPanel
Does anyone know how i would enable the double-buffering that JPanel supports. I have heard that it supports that and you have to enable it. If anyone could help i would really appreciate it thanks.
mdawg
From the JDK1.2.2 API:
Constructor Summary
JPanel()
Create a new JPanel with a double buffer and a flow layout
JPanel(boolean isDoubleBuffered)
Create a new JPanel with FlowLayout and the specified buffering strategy.
JPanel(LayoutManager layout)
Create a new buffered JPanel with the specified layout manager
JPanel(LayoutManager layout, boolean isDoubleBuffered)
Creates a new JPanel with the specified layout manager and buffering strategy.
It would appear that double buffering is the default.
Similar Messages
-
What is the best way to double buffer in this case and how to do it....
currently I have
public class Frame1 extends JFrame{
//inside this class I call up circle class, rectangle class, etc.... to draw
}I am making a "paint" program, and I have individual classes to handle the paint methods heres an example:
abstract public class Shape {
public Shape() {
public abstract void draw(Graphics g, Color c, int x, int y, int width,int height);
}and then....
public class Circle extends Shape{
public Circle() {
public void draw(Graphics g, Color c, int oldx, int oldy, int newx, int newy) {
g.setColor(c);
g.drawOval(Math.min(oldx, newx), Math.min(oldy, newy), Math.abs(oldx - newx), Math.abs(oldy - newy));
}There is also a Rectangle class, line class.... etc! So my question to you is the following... what is the best way to implement double buffer in the individual classes? And how to do it?? And also.... the drawings should be kept inside a jPanel.
Any bit of help is much appreciated Thank you!!You don't need to do double-buffering. Swing
components are double-buffered by default. Just make
sure you override paintComponent() and not paint().
And even if you had to, why would there be any
difference in implementation for your classes whether
they paint to on- or off-screen graphics?I need to override paintComponent()? what if I don't...
I am using JBuilder2005 and they automate somethings for me. So thats how they did it when they created the application they did this....
public class Frame1 extends JFrame{
/*** all my code here***/
public class Application1 {
boolean packFrame = false;
* Construct and show the application.
public Application1() {
Frame1 frame = new Frame1();
// Validate frames that have preset sizes
// Pack frames that have useful preferred size info, e.g. from their layout
if (packFrame) {
frame.pack();
} else {
frame.validate();
// Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
frame.setLocation((screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
* Application entry point.
* @param args String[]
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel(UIManager.
getSystemLookAndFeelClassName());
} catch (Exception exception) {
exception.printStackTrace();
new Application1();
private void jbInit() throws Exception {
} -
Hello
My English abillity is very poor ... sorry
as I know Swing offer double buffer very easy and default
I check My application is offer double buffer (I check use isDoublebuffered())
and I draw my pic in JPanel
paint(Graphics g){
and I make update method
update (Grphaics g){
paint(g);
but my application flash and flicker...
How can I solve my problem?
What I do solve my problem?
plz help
have a nice daypaint(Graphics g){
and I make update method
update (Grphaics g){
paint(g);
}1. JComponent already has method update overridden to call paint -- you shouldn't override update.
2. Don't override paint, override paintComponent instead, usually like this:
protected void paintComponent(Graphics g) {
super.paintComponent(g);
//do your painting here:
}3. Swing components double buffer by default. You shouldn't have to use BufferedImages just to avoid flicker. Try to reduce your problem to a minimal example and post it. -
Double buffer for different components.
Currently I'm working on a project where I have a JPanel inside of a JFrame. The panel takes up a portion of the frame and on other side I have a JButton and two JTextfields. My double buffer method works fine for the JPanel but every time it's repainted the other components in my JFrame look like they need to be buffered. What would be the best way to fix this? I think I just need to re-add the other components whenever the Panel is repainted but I run into a lot of problems if that's the case.
We can't see your code so we'll take your word for it. But if I use Swing components they typically don't 'need buffering' by which I assume you mean that they flicker? So the problem is when you combine your code with Swing so you'll have to debug that yourself or show some code (preferrably as SSCCE).
-
How do I enable double sided printing on my iPad through the HP ePrint app?
HP Laser jet 1102w
I have Windows 7 64 bit and a original iPad.
I would like to save paper when I am printing from my iPad. Is there a setting to enable double-sided printing when printing from an iPad using the HP ePrint app?Hi,
Printing a manual duplex printing is not supported by the HP ePrint app or AirPrint as well, it can only be done with printers who provide automatic two-sided printing.
Regards,
Shlomi
Say thanks by clicking the Kudos thumb up in the post.
If my post resolve your problem please mark it as an Accepted Solution -
In the URL bar, type about:config
Type geo.enabled
Double click on the geo.enabled preference
Location-Aware Browsing is now disabled
Google will not remove their location aware feature saying it is picked up by the location aware feature in my firefox browser and referred me to your like where I found the above to disable this feature. It just sent me to a yahoo search page. How do you disable this I want to use US Google not Google.ua and you don't need this to help me locate anything in the Ukraine. When I take my laptop with me on trips does my firefox local change wherever I go?See:
* http://www.mozilla.com/firefox/geolocation/
*http://browserspy.dk/geolocation.php -
Need to output 8 channels using double buffer
Hi,
I need to ouput 8 channels to the DAQ card.
I am getting an array 8 bytes of data every 10 milliseconds.
Each byte corresponds to a channel.
I am using your WFMDoubleBuffer.c code.
The changes I have made are :
1. Changed the buffer from 32K to 16 bytes. I am assuming 8 bytes with double buffer = 16 bytes
2. I'm not sure about updateRate, so I set it to 1.0
Result : I get an error from WFM_Group_Control(). It says "The operation could not complete within the time limit", error = -10800
I have attached the file for your reference.
Please help me.
Thanking you in anticipation
Chandra
Attachments:
WFMdoubleBuf.C 8 KBChandra,
The timeout error here is slightly misleading. The reason this is happening is caused by a few things. By default, the card to setup to transfer data when the onboard FIFO is full, and so your half buffer must be the same size or large than your FIFO unless you have regeneration turned on. Regeneration will cause your buffer to be copied as many times as possible into the FIFO until it is full. Your 6713 has an AO FIFO size of 16,384. So your buffer size must be twice this, so that your half buffer is >= 16384. Where is your data coming from at these 10 ms intervals, from a program or another device? This could affect what method would be the best solution.
If you want to keep working on this, let�s stick to one channel, I sent you an email, did you get
it?
Kevin R
Applications Engineer
National Instruments -
Hi all,
I've just written this Digital Clock in Java and I'm trying to add a double buffer to it to stop it flickering however I get 4 errors when I try to compile it. Here is the code:
(START OF CODE)
import java.awt.*; //puts in abstract windows toolkit to get output on screen
import java.util.*;
import java.applet.Applet;
import java.awt.event.*;
//<applet code="DigitalClock.class" width=400 height=400></applet> //displays applet without needing to create HTML file
public class DigitalClock extends Applet implements ActionListener, Runnable //listen for action events
Image myimage,buffer;
Graphics doublebuffer;
private javax.swing.Timer timer; //implements timer
public void init() {
timer = new javax.swing.Timer(1000, this);
timer.setInitialDelay(0);
timer.start();
buffer = createImage(width,height);
doublebuffer = buffer.getGraphics();
public void paint(Graphics g) //states that the code below will paint objects onto the applet
g.setColor (Color.white); //sets colour to white
g.drawRect(130, 78, 120, 30); //rectangle shape surrounding digital clock
g.setColor (Color.darkGray); //sets colour to grey
g.fillRect(132, 80, 117, 27); //fills rectangle from code 2 lines up with colour grey
setBackground(Color.black); //specifies background colour as black
Calendar myCal = new GregorianCalendar();
myCal.set(1956, Calendar.MARCH, 17); //
of myCal.setTime(myCal2.getTime());
myCal.setTime(new Date());
int year = myCal.get(Calendar.YEAR); int mnth = myCal.get(Calendar.MONTH) + 1;
int DATE = myCal.get(Calendar.DATE); System.out.println(DATE + "." + mnth + "." + year);
myCal.add(Calendar.YEAR, 1);
DATE myDate = myCal.getTime(); System.out.println(myDate);
GregorianCalendar cal = new GregorianCalendar(); //tells program to implement the a new Gregorian Calemder in order to display a date or time
doublebuffer.setFont(new Font("Arial", Font.BOLD,20)); //sets font to arial, bold style, and size 20
doublebuffer.setColor (Color.white); //sets colour to white
doublebuffer.drawString(cal.get(Calendar.HOUR_OF_DAY) + " : " + //examines windows clock to get current hour
cal.get(Calendar.MINUTE) + " : " + //examines windows clock to get current minute
cal.get(Calendar.SECOND), 140, 100); //examines windows clock to get current second
doublebuffer.setFont(new Font("Arial", Font.BOLD,15)); //sets the font to arial, bold style, and size 15
doublebuffer.drawString("By Darren Cole", 130, 270); //adds words in pink as string and specifies coardinates
doublebuffer.drawString("Last Modified: 03/04/03", 110, 290); //adds words in pink as string and specifies coardinates
doublebuffer.drawLine(90, 60, 130, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(210, 60, 250, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(90, 60, 210, 60); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(90, 90, 130, 107); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(90, 60, 90, 90); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.setColor (Color.darkGray); //sets colour to dark grey
doublebuffer.fillRect(129, 62, 83, 16);
g.drawImage(buffer,0,0,this);
public void actionPerformed(ActionEvent e) //tells program that there is an action event specified in the code below
repaint(); //keeps repainting the digital clock graphics as the time changes i.e. keeps looping the code over
(END OF CODE)
What am I doing wrong here? Also I've tried to implement the date as well using a GregorianCalendar. How would I actually make the date appear on the page?
Thanks,
DarrenMost of that doesn't matter now because I've now put in a simplercode for the date but it still doesn't display. But now I get 10 errors. The new code is:
(START OF CODE)
import java.awt.*; //puts in abstract windows toolkit to get output on screen
import java.util.*;
import java.applet.Applet;
import java.awt.event.*;
//<applet code="DigitalClock.class" width=400 height=400></applet> //displays applet without needing to create HTML file
public class DigitalClock extends Applet implements ActionListener, Runnable //listen for action events
Graphics doublebuffer;
private javax.swing.Timer timer; //implements timer
public void init() {
timer = new javax.swing.Timer(1000, this);
timer.setInitialDelay(0);
timer.start();
doublebuffer = buffer.getGraphics();
public void paint(Graphics g) //states that the code below will paint objects onto the applet
doublebuffer.setColor (Color.white); //sets colour to white
doublebuffer.drawRect(130, 78, 120, 30); //rectangle shape surrounding digital clock
doublebuffer.setColor (Color.darkGray); //sets colour to grey
doublebuffer.fillRect(132, 80, 117, 27); //fills rectangle from code 2 lines up with colour grey
setBackground(Color.black); //specifies background colour as black
Calendar date = new GregorianCalendar();
DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
String date = df.format(new Date());
GregorianCalendar cal = new GregorianCalendar(); //tells program to implement the a new Gregorian Calemder in order to display a date or time
doublebuffer.setFont(new Font("Arial", Font.BOLD,20)); //sets font to arial, bold style, and size 20
doublebuffer.setColor (Color.white); //sets colour to white
doublebuffer.drawString(cal.get(Calendar.HOUR_OF_DAY) + " : " + //examines windows clock to get current hour
cal.get(Calendar.MINUTE) + " : " + //examines windows clock to get current minute
cal.get(Calendar.SECOND), 140, 100); //examines windows clock to get current second
doublebuffer.setFont(new Font("Arial", Font.BOLD,15)); //sets the font to arial, bold style, and size 15
doublebuffer.drawString("By Darren Cole", 130, 270); //adds words in pink as string and specifies coardinates
doublebuffer.drawString("Last Modified: 03/04/03", 110, 290); //adds words in pink as string and specifies coardinates
doublebuffer.drawLine(90, 60, 130, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(210, 60, 250, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(90, 60, 210, 60); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(90, 90, 130, 107); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.drawLine(90, 60, 90, 90); //specifies coardinates for lines that give 3D effect to Digital Clock
doublebuffer.setColor (Color.darkGray); //sets colour to dark grey
doublebuffer.fillRect(129, 62, 83, 16);
g.drawImage(buffer,0,0,this);
public void actionPerformed(ActionEvent e) //tells program that there is an action event specified in the code below
repaint(); //keeps repainting the digital clock graphics as the time changes i.e. keeps looping the code over
(END OF CODE)
The errors are:
---------- Javac ----------
DigitalClock.java:63: 'class' or 'interface' expected
public void actionPerformed(ActionEvent e) //tells program that there is an action event specified in the code below
^
DigitalClock.java:70: 'class' or 'interface' expected
^
DigitalClock.java:70: 'class' or 'interface' expected
^
DigitalClock.java:8: DigitalClock should be declared abstract; it does not define run() in DigitalClock
public class DigitalClock extends Applet implements ActionListener, Runnable //listen for action events
^
DigitalClock.java:21: cannot resolve symbol
symbol : variable buffer
location: class DigitalClock
doublebuffer = buffer.getGraphics();
^
DigitalClock.java:37: cannot resolve symbol
symbol : class DateFormat
location: class DigitalClock
DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
^
DigitalClock.java:37: cannot resolve symbol
symbol : variable DateFormat
location: class DigitalClock
DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
^
DigitalClock.java:37: cannot resolve symbol
symbol : variable DateFormat
location: class DigitalClock
DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
^
DigitalClock.java:38: date is already defined in paint(java.awt.Graphics)
String date = df.format(new Date());
^
DigitalClock.java:58: cannot resolve symbol
symbol : variable buffer
location: class DigitalClock
g.drawImage(buffer,0,0,this);
^
10 errors
Normal Termination
Output completed (2 sec consumed).
Thanks,
Darren -
Double Buffer program is slowing down, help.
Hello, I have a small Dancing Lines program like an old Windows screensaver program and it appears to slow down after about 30 seconds to a minute. I "clear" my buffer by copying a screen sized black symbol to the buffer. If anyone has any ideas about how to make this more efficient and most importantly stop the slow down, please let me know, thanks.
// Variables
var x0:int;
var y0:int;
var x1:int;
var y1:int;
var x2:int;
var y2:int;
var x3:int;
var y3:int;
var dx0:int;
var dy0:int;
var dx1:int;
var dy1:int;
var dx2:int;
var dy2:int;
var dx3:int;
var dy3:int;
var counter:int = 0;
var clearBuffer:Buffer = new Buffer();
var drawing:Shape = new Shape();
var color1:uint = uint(0xFFFFFF * Math.random());
// Initialize Line Values
x0 = int(Math.random() * 320);
x1 = int(Math.random() * 320);
y0 = int(Math.random() * 200);
y1 = int(Math.random() * 200);
x2 = x0;
x3 = x1;
y2 = y0;
y3 = y1;
// Initializing Line Velocities
dx0 = int(Math.random() * 5);
dx1 = int(Math.random() * 5);
dy0 = int(Math.random() * 5);
dy1 = int(Math.random() * 5);
dx2 = dx0;
dx3 = dx1;
dy2 = dy0;
dy3 = dy1;
// Double Buffer Setup
var bitmap:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,true,0xff000000);
var buffer:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,true,0xff000000);
var image:Bitmap = new Bitmap(bitmap);
addChild(image);
// Listeners
addEventListener(Event.ENTER_FRAME,onEnterFrame);
function onEnterFrame(event:Event):void {
// Clear The Sreen
buffer.draw(clearBuffer);
// Logic
drawing.graphics.lineStyle(1, color1);
drawing.graphics.moveTo(x0,y0);
drawing.graphics.lineTo(x1,y1);
if ((x0 += dx0) >= 315 || x0 < 5)
dx0 *= -1;
if ((y0 += dy0) >= 195 || y0 < 5)
dy0 *= -1;
if ((x1 += dx1) >= 315 || x1 < 5)
dx1 *= -1;
if ((y1 += dy1) >= 195 || y1 < 5)
dy1 *= -1;
if (++counter > 50) {
drawing.graphics.lineStyle(1, 0x000000);
drawing.graphics.moveTo(x2,y2);
drawing.graphics.lineTo(x3,y3);
if ((x2 += dx2) >= 315 || x2 < 5)
dx2 *= -1;
if ((y2 += dy2) >= 195 || y2 < 5)
dy2 *= -1;
if ((x3 += dx3) >= 315 || x3 < 5)
dx3 *= -1;
if ((y3 += dy3) >= 195 || y3 < 5)
dy3 *= -1;
if (counter > 250)
counter = 51;
// Draw The Screen
buffer.draw(drawing, drawing.transform.matrix);
bitmap.draw(buffer);
P.S. - Is there a way I can post my code in a smaller box with a scrollbar?Here is a fixed version:
// Variables
var x0:int;
var y0:int;
var x1:int;
var y1:int;
var x2:int;
var y2:int;
var x3:int;
var y3:int;
var dx0:int;
var dy0:int;
var dx1:int;
var dy1:int;
var dx2:int;
var dy2:int;
var dx3:int;
var dy3:int;
var counter:int = 0;
var drawing:Shape = new Shape();
var color1:uint = uint(0xFFFFFF * Math.random());
// Initialize Line Values
x0 = int(Math.random() * 320);
x1 = int(Math.random() * 320);
y0 = int(Math.random() * 200);
y1 = int(Math.random() * 200);
x2 = x0;
x3 = x1;
y2 = y0;
y3 = y1;
// Initializing Line Velocities
dx0 = int(Math.random() * 5);
dx1 = int(Math.random() * 5);
dy0 = int(Math.random() * 5);
dy1 = int(Math.random() * 5);
dx2 = dx0;
dx3 = dx1;
dy2 = dy0;
dy3 = dy1;
// Double Buffer Setup
var bitmap:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,true,0xff000000);
var buffer:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,true,0xff000000);
var image:Bitmap = new Bitmap(bitmap);
addChild(image);
// Listeners
addEventListener(Event.ENTER_FRAME,onEnterFrame);
function onEnterFrame(event:Event):void {
// Logic
drawing.graphics.lineStyle(1, color1);
drawing.graphics.moveTo(x0,y0);
drawing.graphics.lineTo(x1,y1);
if ((x0 += dx0) >= 315 || x0 < 5)
dx0 *= -1;
if ((y0 += dy0) >= 195 || y0 < 5)
dy0 *= -1;
if ((x1 += dx1) >= 315 || x1 < 5)
dx1 *= -1;
if ((y1 += dy1) >= 195 || y1 < 5)
dy1 *= -1;
if (++counter > 50) {
drawing.graphics.lineStyle(1, 0x000000);
drawing.graphics.moveTo(x2,y2);
drawing.graphics.lineTo(x3,y3);
if ((x2 += dx2) >= 315 || x2 < 5)
dx2 *= -1;
if ((y2 += dy2) >= 195 || y2 < 5)
dy2 *= -1;
if ((x3 += dx3) >= 315 || x3 < 5)
dx3 *= -1;
if ((y3 += dy3) >= 195 || y3 < 5)
dy3 *= -1;
// Draw The Screen
buffer.draw(drawing, drawing.transform.matrix);
bitmap.draw(buffer);
// clear drawing canvas
drawing.graphics.clear();
Basically you have to use the graphics.clear() function to erase any clip where you are using the drawing API. Drawing lots of vectors can be very costly performance-wise so you always want to clear your graphics when you are finished. Drawing over the vectors with a rectangle has no effect except to increase the load even more. However when dealing with bitmap objects you can safely draw as much as you want for as long as you wish with no performance hit. Thats why what you were trying to do with that "clearBuffer" was not doing anything. Also, setting the counter to 51 when it got to 250 was doing nothing whatsoever. Not sure what that was for. The code should work fine now. -
How to double-buffer a JWindow?
Hi,
I made a resizable JWindow, but whenever I resize, J-components within the window flicker. (First setSize(), then validate() to redraw for correct sizes). I know JWindow is not double buffered, I want to override the paint() method to implement double buffering -- anyone knows how to do that? (...besides copying from JComponent.java)I think double buffering available in Swing with out you doing anything. Just add the following line to your window initialization.
((JPanel)window.getContentPane()).setDoubleBuffered(true);If this doesn't work, and I think it should. Then use the code below.
This is code copied from http://java.sun.com/j2se/1.3/docs/guide/awt/designspec/lightweights.html
The following is a Panel, but you can apply the same logic to JWindow.
public class DoubleBufferPanel extends Panel {
Image offscreen;
* null out the offscreen buffer as part of invalidation
public void invalidate() {
super.invalidate();
offscreen = null;
* override update to *not* erase the background before painting
public void update(Graphics g) {
paint(g);
* paint children into an offscreen buffer, then blast entire image
* at once.
public void paint(Graphics g) {
if(offscreen == null) {
offscreen = createImage(getSize().width, getSize().height);
Graphics og = offscreen.getGraphics();
og.setClip(0,0,getSize().width, getSize().height);
super.paint(og);
g.drawImage(offscreen, 0, 0, null);
og.dispose(); -
Macbook won't let me enable double sided printing? (Samsung ML-191x252x series)
Hi,
i recently bought a macbook pro (currently running OS 10.8.4). I connected it to my 3 year old Samsung ML-1915 printer yesterday to print something and discovered i cannot enable the double sided printing option... I checked online how to do it from system preferences , only to discover that the option actually isn't available to me. I installed the driver online from Softpedia but i still can't switch on duplex printing when i go to system preferences. This really bugs me since i can't even select even/ uneven pages to print (to do it manually..).
Any ideas/hints how to fix this?
Kind greets,
LaurensHello,
so i updated to 10.8.5, then discovered there was an additional Samsung update in App store. I installed that one as well, but it still didn't show in system Preferences. Then i deleted the printer, added it again and it still didn't work... I contacted Samsung chat support, they helped me to get the latest driver, and hooked me up with Smart Panel. Smart panel seems useless though, as it doesn't really allow me to do anything special. It's just a small box that indicates the toner level. Nothing to add about software, or double sided printing. 'm kinda lost by now... -
Conky won't use double buffer anymore?
i posted the other day having issues setting up dual monitors, not that i got any help, but figured i'd mention. anyway, since i've had the dual monitors setup, conky won't run using double buffering for some reason. its in my conky config, and DBE is being loaded in my xorg.conf. so its bugging me now. wondering is anyone has a clue here. my system is fully up to date as of right now, and running an nvidia card, so nvidia driver on a 7900GS video card, might be an 8800, i forget which card is in which box at the moment
here's my conky config
alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders yes
#draw_outline yes
draw_shades yes
use_xft yes
xftfont DejaVu Sans Mono:size=10
gap_x 5
gap_y 5
minimum_size 5 5
net_avg_samples 2
#no_buffers yes
double_buffer yes
out_to_console no
out_to_stderr no
own_window yes
own_window_transparent yes
own_window_class Conky
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_page
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
TEXT
$nodename - $sysname $kernel on $machine
Uptime:$color $uptime
$hr
CPU > ${freq}MHz ${hr 1}$color
CPU Usage:$color $cpu% ${cpubar 4}
${cpugraph 15,280 ffffff 00A2FF}
MEMORY $memmax ${hr 1}
RAM : $mem / $memperc%${alignr}${membar 6,120}
I/O : ${diskio}${alignr}${diskiograph 6,120}
DISK > /dev/ ${hr 1}$color
Root ( sda3 ): ${fs_free /} ${fs_bar 6 /}
Home ( sda4 ): ${fs_free /home} ${fs_bar 6 /home}
Movies ( sdb1 ): ${fs_free /home/movies} ${fs_bar 6 /home/movies}
Windows ( sdc1 ): ${fs_free /mnt/sdc1} ${fs_bar 6 /mnt/sdc1}
NETWORK > ${addr eth0} ${hr 1}$color
${downspeedgraph eth0 15,135 ffffff 00A2FF} ${upspeedgraph eth0 15,135 ffffff 00A2FF}
Down / Up Speed: ${downspeed eth0} k/s / ${upspeed eth0} k/s
Down / Up Bytes: ${totaldown eth0} / ${totalup eth0}
Inbound / Outbound / Total: ${tcp_portmon 1 32767 count} / ${tcp_portmon 32768 61000 count} / ${tcp_portmon 1 65535 count}
PROCESSES > ${processes} / ${running_processes} ${hr 1}$color
NAME PID CPU% MEM%
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${exec feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`"}
here's my xorg.conf as well if it helps. if there is anything someone can suggest adding or removing from it, especially to tweak video performance, i'm wide open for suggestions while im here
Section "ServerLayout"
Identifier "Xorg Configured"
Screen 0 "Screen0" LeftOf "Screen1"
Screen 1 "Screen1" 1600 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "PS/2 Mouse" "CorePointer"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc:unscaled"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/75dpi:unscaled"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/PEX"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/ttf/western"
FontPath "/usr/share/fonts/ttf/decoratives"
FontPath "/usr/share/fonts/truetype"
FontPath "/usr/share/fonts/truetype/openoffice"
FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
FontPath "/usr/share/fonts/latex-ttf-fonts"
FontPath "/usr/share/fonts/defoma/CID"
FontPath "/usr/share/fonts/defoma/TrueType"
EndSection
Section "Module"
Load "ddc" # ddc probing of monitor
Load "dbe"
Load "extmod"
Load "glx"
Load "bitmap" # bitmap-fonts
EndSection
Section "ServerFlags"
Option "AllowMouseOpenFail" "true"
Option "Xinerama" "1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" ""
EndSection
Section "InputDevice"
Identifier "Serial Mouse"
Driver "mouse"
Option "Protocol" "Microsoft"
Option "Device" "/dev/ttyS0"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection
Section "InputDevice"
Identifier "PS/2 Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection
Section "InputDevice"
Identifier "USB Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "SendCoreEvents" "true"
Option "Protocol" "IMPS/2"
Option "ZAxisMapping" "4 5"
Option "Buttons" "5"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "CRT-0"
HorizSync 30.0 - 121.0
VertRefresh 48.0 - 160.0
ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
Option "DPMS" "true"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "SUN GDM-5410"
HorizSync 30.0 - 121.0
VertRefresh 48.0 - 160.0
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7900 GS"
BusID "PCI:2:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7900 GS"
BusID "PCI:2:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "TwinViewXineramaInfoOrder" "CRT-0"
Option "metamodes" "CRT-0: 1600x1200_75 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinViewXineramaInfoOrder" "CRT-0"
Option "TwinView" "0"
Option "metamodes" "CRT-1: 1600x1200 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSectionHi @Arboria9 ,
I see that you are experiencing issues printing two-sided from Yosemite. I would like to help you resolve this issue.
You have pretty much have done all the steps that I would have provided.
Are you still able to print two-sided from the Windows computer?
Are you missing the option to select two-sided printing in the print driver?
Check the driver name that is installed for the printer. Make sure it shows just the printer's name.
Click the Apple menu and then click System Preferences. Click Printers & Scanners, highlight the printer name on the left side and on the right side of the screen it should show the printer's name. (Officejet 6500)
If the full printer name isn't listed correctly, delete it and add the printer name back in from the list. Click the - sign to delete the driver and then click the + sign to add the driver, might have to click the drop down to select the printer's name to add it in.
How was the printer name listed?
If you need further assistance, just let me know.
Have a great day!
Thank You.
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Gemini02
I work on behalf of HP -
To double buffer or not double buffer..that is the question
i am not very familiar with double buffering but am reading examples
of it now. Im not doing animaiton and i dont think im doing alot of
drawing to the screen but im arookie so its hard to tell. Can you tell
me if i should implement double buffering by looking at my code. Im
wondering cuz my webpage is a mess.(http://ktowndrivewaysealing.tripod.com).
i have trailing components and flickering and i dont know how to fix it.
thanx
trin
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.util.*;
public class MyProg extends Applet implements ActionListener
Button btnOne = new Button("Home");
Button btnTwo = new Button("Asphalt Sealing");
Button btnThree = new Button("Crack Repairs");
Button btnFour = new Button("Pressure Washing");
Button btnFive = new Button("Free Estimates");
Button btnSix = new Button("Contact Us");
Font font1= new Font ( "TimesNewRoman",Font.BOLD,12);
Font font2=new Font("TimesNewRoman", Font.BOLD, 35);
Font font3=new Font("TimesNewRoman", Font.BOLD, 25);
Font font4=new Font("TimesNewRoman",Font.BOLD,20);
Font font5=new Font("Dialog", Font.BOLD+Font.ITALIC, 16);
Label title1=new Label("KINGSTON", Label.CENTER);
Label title2 = new Label("Driveway Sealing", Label.CENTER);
Label title3=new Label("613-531-3369", Label.CENTER);
Label caption1=new Label("Your driveway is the first impression your home makes...", Label.CENTER);
Label caption2=new Label("Make it a Good one.", Label.CENTER);
Image drivewaypic1;
Image drivewaypic2;
URL homeUrl;
URL asphaltUrl;
URL crackUrl;
URL pressureUrl;
URL freeUrl;
URL contactUrl;
public void init()
setLayout(null);
try
homeUrl = new URL(getCodeBase(),"Home.html");
asphaltUrl=new URL(getCodeBase(),"AsphaltHtml.html");
crackUrl= new URL(getCodeBase(),"CrackHtml.html");
pressureUrl=new URL(getCodeBase(),"PressureHtml.html");
freeUrl= new URL(getCodeBase(),"FreeHtml.html");
contactUrl= new URL(getCodeBase(),"ContactUsHtml.html");
catch (MalformedURLException e)
return;//maybe i should leave blank..will test later
drivewaypic1=getImage(getCodeBase(),"drivewaypic1.jpg");
drivewaypic2=getImage(getCodeBase(),"drivewaypic2.jpg");
add(btnOne);
add(btnTwo);
add(btnThree);
add(btnFour);
add(btnFive);
add(btnSix);
add(title1);
add(title2);
add(title3);
add(caption1);
add(caption2);
btnOne.setFont(font1);
btnOne.setBounds(15,159,120,40);
btnOne.setBackground(Color.black);
btnOne.setForeground(Color.white);
btnTwo.setFont(font1);
btnTwo.setBounds(15,199,120,40);
btnTwo.setBackground(Color.black);
btnTwo.setForeground(Color.white);
btnThree.setFont(font1);
btnThree.setBounds(15,239,120,40);
btnThree.setBackground(Color.black);
btnThree.setForeground(Color.white);
btnFour.setFont(font1);
btnFour.setBounds(15,279,120,40);
btnFour.setBackground(Color.black);
btnFour.setForeground(Color.white);
btnFive.setFont(font1);
btnFive.setBounds(15,319,120,40);
btnFive.setBackground(Color.black);
btnFive.setForeground(Color.white);
btnSix.setFont(font1);
btnSix.setBounds(15,359,120,40);
btnSix.setBackground(Color.black);
btnSix.setForeground(Color.white);
title1.setBounds(5,5,585,33);
title1.setBackground(Color.lightGray);
title1.setForeground(Color.black);
title1.setFont(font3);
title2.setBounds(5,39,590,36);
title2.setBackground(Color.black);
title2.setForeground(Color.white);
title2.setFont(font2);
title3.setBounds(5,75,590,30);
title3.setBackground(Color.lightGray);
title3.setForeground(Color.black);
title3.setFont(font4);
caption1.setBounds(163,113,450,23);
caption1.setFont(font5);
caption1.setBackground(Color.lightGray);
caption1.setForeground(Color.blue);
caption2.setBounds(163,134,446,23);
caption2.setFont(font5);
caption2.setBackground(Color.lightGray);
caption2.setForeground(Color.blue);
btnOne.addActionListener(this);
btnTwo.addActionListener(this);
btnThree.addActionListener(this);
btnFour.addActionListener(this);
btnFive.addActionListener(this);
btnSix.addActionListener(this);
btnOne.setActionCommand("Home");
btnTwo.setActionCommand("Asphalt Sealing");
btnThree.setActionCommand("Crack Repairs");
btnFour.setActionCommand("Pressure Washing");
btnFive.setActionCommand("Free Estimates");
btnSix.setActionCommand("Contact Us");
public void actionPerformed (ActionEvent e)
String s=e.getActionCommand();
if (s.equals("Home"))
getAppletContext().showDocument(homeUrl);
if (s.equals("Asphalt Sealing"))
getAppletContext().showDocument(asphaltUrl);
if (s.equals("Crack Repairs"))
getAppletContext().showDocument(crackUrl);
if (s.equals("Pressure Washing"))
getAppletContext().showDocument(pressureUrl);
if (s.equals("Free Estimates"))
getAppletContext().showDocument(freeUrl);
if (s.equals("Contact Us"))
getAppletContext().showDocument(contactUrl);
public void paint(Graphics g)
super.paint(g);
g.setColor(Color.lightGray);
g.fillRect(1,1,600,600);
//g.fillRect(1,1,147,650);
g.setColor(Color.black);
g.drawRoundRect(1,1,595,105,10,10);
g.drawRoundRect(2,2,593,103,10,10);
g.drawRoundRect(3,3,591,101,10,10);
g.drawRoundRect(4,4,589,99,10,10);
g.drawImage(drivewaypic1,170,159,375,225,this);
g.drawImage(drivewaypic2,170,386,375,225,this);
g.drawRoundRect(1,110,150,495,10,10);
g.drawRoundRect(2,111,148,493,10,10);
g.drawRoundRect(3,112,146,491,10,10);
g.drawRoundRect(4,113,144,489,10,10);
It seems you aren't using any animation in this applet, so you won't have to use double buffering... :)
-
I am trying do a sanity check before I order some hardware.
What I want to do is acquire from multiple channels in a SCXI chasis and as part of the same acquisition, also read from one of the "un-used" AI channels of the MIO card.
My concern is this:
All of the channels of the SCXI chassis get multiplexed down into a single channel of the MIO card that controls the SCXI chassis. This means that channel 0 has to do multiple A/D conversions to get a reading from all of the configured SCXI channels.
Meanwhile, the other AI channel of the MIO only has to do one to get it's reading. It seems that the on-boar
d clock of the MIO would have to run at two rates to be able to read all of my SCXI channels AND the other AI channel.
What I want to do:
I want to just configure a vitual channel for all of my SCXI channels AND one more for one "odd-ball" signal that is incompatable with all of the SCXI modules.
Then I just want to list all of my virtual channels when I configure and start my continuous double buffered acquisition.
I have successfully done all SCXI channels before, but I have never tried to use one of the un-used AI on the MIO at the same time. I have used the spare DIO lines previously, but that will not work in this app.
So...
If you have done this and it worked, I would greatly appreciate hearing about any special techniques that were used, etc.
Thank you for reading this question,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under constructionJeremy answered here
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000007C40000&UCATEGORY_0=_30_%24_12_&UCATEGORY_S=0
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
I am trying do a sanity check before I order some hardware.
What I want to do is acquire from multiple channels in a SCXI chasis and as part of the same acquisition, also read from one of the "un-used" AI channels of the MIO card.
My concern is this:
All of the channels of the SCXI chassis get multiplexed down into a single channel of the MIO card that controls the SCXI chassis. This means that channel 0 has to do multiple A/D conversions to get a reading from all of the configured SCXI channels.
Meanwhile, the other AI channel of the MIO only has to do one to get it's reading. It seems that the on-boar
d clock of the MIO would have to run at two rates to be able to read all of my SCXI channels AND the other AI channel.
What I want to do:
I want to just configure a vitual channel for all of my SCXI channels AND one more for one "odd-ball" signal that is incompatable with all of the SCXI modules.
Then I just want to list all of my virtual channels when I configure and start my continuous double buffered acquisition.
I have successfully done all SCXI channels before, but I have never tried to use one of the un-used AI on the MIO at the same time. I have used the spare DIO lines previously, but that will not work in this app.
So...
If you have done this and it worked, I would greatly appreciate hearing about any special techniques that were used, etc.
Thank you for reading this question,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under constructionJeremy answered here
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000007C40000&UCATEGORY_0=_30_%24_12_&UCATEGORY_S=0
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Maybe you are looking for
-
Purchase Order DestinationType
In 11i, i enter a Purchase Order for a particular supplier and defined the destination type in distributions as "expense" and approved the PO. While taking the GRN (PO receipt) for the approved PO the destination type is freezed as "receiving" rather
-
How to avoid login prompt when viewing reports
Hello, I am trying to access a report that I have put in the shared reports folder I have copied the URL, see below, from the copy shortcut link. However I am being prompted for a User name and password http://server:port/OracleBAM/12345/reportserver
-
I have mail coming from a server without POP. I have it auto forwarding to another account that does have POP and I get it into Mail through that account. BUT, when I reply, I want it's FROM address to be the original account. Thus, I need to create
-
I have changed my apple password three times because i keep getting an error message when i try to loggin to App Store.
-
Resize custom shapes that I have downloaded
Hi, I have downloaded some scroll picture frames as custom shapes. but on draging over picture they are thick and huge. can i alter the size of custom shapes. I have tried doing on a separate layer and when these particular shapes there is no s