How to put the background of an java.awt.Label transparent?
I have a label (java.awt.Label) and I want to put the background transparent, so if i move it over other elements, one can only see the text and not the background.
How does this work? Can anyone help me?
Bye
Sebastian
how I can get the background color of a cell when mouse clickedAttach a mouseListener to your table. In that listener find the clicked cell through myTable.rowAtPoint(MouseEvent.getPoint()) dto. with column.
Then myTable.getCellRenderer(int row, int column), and in the renderer you look for the colour.
Similar Messages
-
How to put the background image in Title Window?
Hi,
I'm newbie in flex. I 'm using Flex 4.
Can anyone give me some guidelines on how to put the background image in Title Window?
Is it possible to do this?
Thanks.Hi,
Check the below sample code
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|BorderContainer {
background-image:Embed(source="image/wheres_the_green_rez.jpg");
background-image-fill-mode:clip;
</fx:Style>
<s:TitleWindow width="100%" height="100%">
<s:BorderContainer width="100%" height="100%"/>
</s:TitleWindow>
</s:Application>
Regards,
Anitha -
How to put the current timer in the frame
I am doing one application and i am using frame. I want to show the current time( hour and minute). But i don't know how to implement it. Please help me to solve my problem. Below is the sample code of my program. How to put the timer in the bottom part.
//AdminMenu.java
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class AdminMenu extends JFrame{
private JLabel lblmenu;
private JLabel lblvideo;
private JLabel lbladmin;
private JButton cmdaddvideo, cmddeletevideo, cmdeditvideo;
private JButton cmdaddadmin, cmddeleteadmin, cmdchangepass;
private Container c;
private GridBagLayout gdlayout;
private GridBagConstraints gdconstraints;
private Color colorValues[] =
{ Color.black, Color.blue, Color.red, Color.green };
public AdminMenu()
super("Administration Menu");
JMenu fileMenu = new JMenu( "File" );
fileMenu.setMnemonic( 'F' );
JMenu openMenu = new JMenu ("Open");
openMenu.setMnemonic('O');
fileMenu.add( openMenu );
JMenuItem exitItem = new JMenuItem( "Exit" );
exitItem.setMnemonic( 'x' );
exitItem.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent event )
System.exit( 0 );
} // end anonymous inner class
); // end call to addActionListener
fileMenu.add( exitItem );
// create menu bar and attach it to MenuTest window
JMenuBar bar = new JMenuBar();
setJMenuBar( bar );
bar.add( fileMenu );
setSize(300,250);
setLocation(350,200);
this.setResizable(true);
show();
//---------------------- Main -------------------------------
public static void main(String args[])
AdminMenu app = new AdminMenu();
app.setDefaultCloseOperation(
JFrame.EXIT_ON_CLOSE );
Thanks for helping mee.g. use a thread that invokes new Date() (every minute), format the Date with SimpleDateFormat and print the result String on a Label that you can put on your frame ...
-
How to put the trace messages in JSP DynPage
Hi,
How to put the trace messages in JSP DynPage components. What settings I need to do and where do I see the trace log.
Can I also print the values of some variables in trace. If yes, how to achieve this?
Thanks in advance,
Regards,
MadhuHi Madhu,
for NW04 see http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm
as well as
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/using logging and tracing on the sap web as java.pdf
Hope it helps
Detlev -
How to schedule the background job using current selection screen field val
Hello Friends,
How to schedule the background job using current selection screen field values.
after completion of the job the spool should be sent as a mail to SAP Inbox.
Is there any way to create the variant dynamically by reading the current selection screen values.
Thanks,
RaviHi,
To get the variant details you can use teh following FM.
'RS_VARIANT_CONTENTS'.
Regards,
Ankur Parab -
How to schedule the background job daily twice?
Hi,
How to schedule the background job daily twice? any conditions?
Regards,
Srihithasee the step by step procedure.
Scheduling Background Jobs:
1. Background jobs are scheduled by Basis administrators using transaction SM36.
2. To run a report in a background, a job needs to be created with a step using the report name
and a variant for selection parameters. It is recommended to create a separate variant for each
scheduled job to produce results for specific dates (e.g. previous month) or organizational units (e.g.
company codes).
3. While defining the step, the spool parameters needs to be specified
(Step-> Print Specifications->Properties) to secure the output of the report and help authorized users
to find the spool request. The following parameters needs to be maintained:
a. Time of printing: set to Send to SAP spooler Only for now
b. Name abbreviated name to identify the job output
c. Title free form description for the report output
d. Authorization a value defined by Security in user profiles to allow those users to access
this spool request (authorization object S_SPO_ACT, value SPOAUTH). Only users with matching
authorization value in their profiles will be able to see the output.
e. Department set to appropriate department/functional area name. This field can be used in
a search later.
f. Retention period set to Do not delete if the report output needs to be retained for more
than 8 days. Once the archiving/document repository solution is in place the spool requests could
be automatically moved to the archive/repository. Storage Mode parameter on the same screen
could be used to immediately send the output to archive instead of creating a spool request.
Configuring user access:
1. To access a report output created by a background job, a user must have at
least access to SP01 (Spool requests) transaction without restriction on the user
name (however by itself it will not let the user to see all spool requests). To have
that access the user must have S_ADMI_FCD authorization object in the profile with
SPOR (or SP01) value of S_ADMI_FCD parameter (maintained by Security).
2. To access a particular jobs output in the spool, the user must have
S_SPO_ACT object in the profile with SPOAUTH parameter matching the value used
in the Print Specifications of the job (see p. 3.d above).
3. Levels of access to the spool (display, print once, reprint, download, etc) are
controlled by SPOACTION parameter of S_SPO_ACT. The user must have at least
BASE access (display).
On-line reports:
1. Exactly the same configuration can be maintained for any output produced
from R/3. If a user clicks Parameters button on a SAP Printer selection dialog, it
allows to specify all the parameters as described in p. 3 of
Scheduling background jobs section. Thus any output created by an online report
can be saved and accessed by any user authorized to access that spool request
(access restriction provided by the Authorization field of the spool request
attributes, see p. 3.d of Scheduling background jobs section).
Access to reports output:
1. A user that had proper access (see Configuring user access above) can
retrieve a job/report output through transaction SP01.
2. The selection screen can be configured by clicking Further selection
criteria button (e.g. to bring Spool request name (suffix 2) field or hide other
fields).
3. The following fields can be used to search for a specific output (Note that
Created By must be blank when searching for scheduled jobs outputs)
a. Spool request name (suffix 2) corresponds to a spool name in p. 3.b in
Scheduling background jobs section above).
b. Date created to find an output of a job that ran within a certain date range.
c. Title corresponds to spool Title in p. 3.c in Scheduling background jobs
section above).
d. Department - corresponds to spool Department in p. 3.e in Scheduling
background jobs section above).
4. Upon entering selection criteria, the user clicks the Execute button to
retrieve the list of matching spool requests.
5. From the spool list the user can use several function such as view the
content of a spool request, print the spool request, view attributed of the spool
request, etc. (some functions may need special authorization, see p.3 in
Configuring user access)
a. Click the Print button to print the spool request with the default attributes
(usually defined with the job definition). It will print it on a printer that was
specified when a job was created.
b. Click the Print with changed attributed button to print the spool request
with the different attributes (e.g. changing the printer name).
c. Click the Display contents button to preview the spool request contents. A
Print and Download functions are available from the preview mode. -
i have an ipod touch and i put cds on itunes onmy computer , but i cant figure out how to put the music from the cds on my ipod touch can anyone help me?
ok i select th e music from my music libary and go to file and click sync to my ipod and when it gets to step 3.. it says waiting for changes to be made.. yes the songs play on the itunes .. and no it wasnt the same computer i used last time
-
How to use the TCP/IP in Java?Thanks!
How to use the TCP/IP in Java?Thanks!
Look at the java.net package, more specifically to classes ServerSocket (The server TPC conection) and Socket (the client TCP conection)
Abraham -
How to change the background color of a single row
Hi OTN,
I am using JDeveloper 11.1.1.2 with ADF faces in view layer.My issue is How to change the background color of a single row in af:table ?.How to highlight ADF table row based on column value?
Found by searching -
How to put the form in Query mode
Hello
Please let me know how to put the form or block in Query mode , so that when i run the form it should be in Query mode . I have seen properties of SET_FORM_PROPERTY and SET_BLOCK_PROPERTY but cannot find one
ThanksQUERY mode? Did you mean, that you can only QUERY without changing data.
This is the QUERY-ONLY-mode, which can be started e.g. call_form
this is the help for that topic:
PROCEDURE CALL_FORM
(formmodule_name VARCHAR2,
display NUMBER,
switch_menu NUMBER,
query_mode NUMBER,
data_mode NUMBER,
paramlist_name VARCHAR2);
query_mode
NO_QUERY_ONLY (The default.) Form Builder will run the indicated form in normal mode, allowing the end user to perform inserts, updates, and deletes from within the called form.
QUERY_ONLY Form Builder will run the indicated form in query-only mode, allowing the end user to query, but not to insert, update, or delete records. -
How to change the background color of a desktop??
any ideas how to change the background color of a desktop?? Now the default color is blue. I couldn't fine the API in JDesktopPane on doing that..
JDesktopPane desktop = new JDesktopPane(); //(textArea);Try the method setBackground. For me it's work.
-
Visa has changed for the purchase of Apple products, i did not know how I put the new MasterCard number to finish the process of buying products Thank you
i have ibad mini
and iphone4
laptop sony
can you sent for me the anserChanging Account Information > http://support.apple.com/kb/HT1918
-
I just purchased an Apple TV. I have a pc running windows 7. It is connected to a router and the router is connected to a wireless router. I connect my iPhone, iPad and apple tv to wireless network but do not know how to put the pc on the wifi network so the Apple TV can do home share.
I don't mean to be facetious but sometimes the simplest things are overlooked. To connect to your library you have to have the computer where the iTunes library is located running and with iTunes open. It also needs to be on the same network. My network is dual band and works with either stream but a friend of mine does not. He has to set the computer and the Apple TV to the same band. Hope this helps.
-
How to create the exe file for java project.
How to create the exe file for java project.
am done the project in java swing , i like to create the project in exe format, so any one help for me,
send the procedure for that.
thanking u.How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
and got several useful links.
Better search terms might yield even better results.
Sheesh. -
How to put the file name in notepad file
dear frank,
how to put the file name in notepad file via power shell. I mean i want to put the file name in that notepad file
for example,
my file name is ABL and in this file data is
02/06/2015,180.00,182.00,176.01,180.50,1575500
02/06/2015,4.20,4.20,4.20,4.20,500
02/06/2015,113.50,113.70,112.91,113.09,157800
02/06/2015,682.01,695.90,682.00,683.19,4250
02/06/2015,213.98,215.00,213.00,214.87,326200
02/06/2015,21.52,21.65,21.52,21.60,4000
02/06/2015,111.00,111.25,108.25,108.91,17100
02/06/2015,52.00,52.00,52.00,52.00,500
and i want to data in this form
ABL,02/06/2015,180.00,182.00,176.01,180.50,1575500
ABL,02/06/2015,4.20,4.20,4.20,4.20,500
ABL,02/06/2015,113.50,113.70,112.91,113.09,157800
ABL,02/06/2015,682.01,695.90,682.00,683.19,4250
ABL,02/06/2015,213.98,215.00,213.00,214.87,326200
ABL,02/06/2015,21.52,21.65,21.52,21.60,4000
ABL,02/06/2015,111.00,111.25,108.25,108.91,17100
ABL,02/06/2015,52.00,52.00,52.00,52.00,500
There are many file like this that i want to be edit
plese tell me how can i do it, i think it is possible via windows power shell.
thanks in advance.Hi
Just for completeness, what version of VB.NET are you using?
Here is a complete project to copy all the files with the added "ABL," at the start of each line. You need to start a new Project with a BLANK default Form1, and replace all of Form1 code with the code below. When you run this project, you
need to use the 2 buttons to set up the ORIGINAL file folder and a folder to place the copies. You need to check if the file EXTENSION is correct (I assumed txt), and check the text to add to each line is correct. Once all is set up you should have a
big red button to start the operation.
NOTE: it is important that you try this out on a copy of some of the files to verify accuracy BEFORE trying on original files. Make sure you have a good back up of the original files before doing anything else.
' new project with default BLANK Form1
' replace all Form1 code with this code
' WARNING: make sure you have a backup of
' any files you use this application to
' operate on.
Option Strict On
Option Infer Off
Option Explicit On
Public Class Form1
Dim OrigFileFolderPath As String = Nothing
Dim CopyToFolderPath As String = Nothing
Dim lab1, lab2, lab3 As New Label
Dim tb1, tb2, tb3 As New TextBox
Dim b1, b2, b3, b4 As New Button
Dim fb As New FolderBrowserDialog
Dim bgw As New System.ComponentModel.BackgroundWorker
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Me.Size = New Size(731, 300)
With lab1
.Text = "Original Files Folder Path"
.Location = New Point(15, 5)
End With
With tb1
.Width = 560
.Location = New Point(10, 30)
.BackColor = Color.Khaki
.ForeColor = Color.Maroon
.Font = New Font(Me.Font.FontFamily, 12)
.BorderStyle = BorderStyle.FixedSingle
.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
End With
With lab2
.Text = "Copy Files to Folder Path"
.Location = New Point(15, 125)
End With
With tb2
.Width = 665
.Location = New Point(10, 150)
.BackColor = Color.Khaki
.ForeColor = Color.Maroon
.Font = New Font(Me.Font.FontFamily, 12)
.BorderStyle = BorderStyle.FixedSingle
.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
End With
With lab3
.Text = "File Ext"
.Location = New Point(600, 5)
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
End With
With tb3
.Text = ".txt"
.Width = 80
.Location = New Point(590, 30)
.BackColor = Color.Khaki
.ForeColor = Color.Maroon
.TextAlign = HorizontalAlignment.Center
.Font = New Font(Me.Font.FontFamily, 12)
.BorderStyle = BorderStyle.FixedSingle
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
End With
With b1
.Text = "Choose Original Files Folder Path"
.AutoSize = True
.Location = New Point(10, 65)
End With
With b2
.Text = "Choose Copy Files to Folder Path"
.AutoSize = True
.Location = New Point(10, 185)
End With
With b3
.Text = "DO THE COPY"
.AutoSize = False
.Size = New Size(240, 50)
.BackColor = Color.Red
.ForeColor = Color.White
.Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
.Location = New Point(420, 80)
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
.Visible = False
End With
With b4
.Text = "CANCEL JOB"
.AutoSize = False
.Size = New Size(240, 50)
.BackColor = Color.Red
.ForeColor = Color.White
.Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
.Location = New Point(420, 80)
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
.Visible = False
End With
Me.Controls.AddRange({lab1, lab2, lab3, tb1, tb2, tb3, b1, b2, b3, b4})
With bgw
.WorkerReportsProgress = True
.WorkerSupportsCancellation = True
End With
AddHandler bgw.DoWork, AddressOf bgw_DoWork
AddHandler bgw.RunWorkerCompleted, AddressOf bgw_Completed
AddHandler b1.Click, AddressOf b1_Click
AddHandler b2.Click, AddressOf b2_Click
AddHandler b3.Click, AddressOf b3_Click
AddHandler b4.Click, AddressOf b4_Click
End Sub
Private Sub b1_Click(sender As Object, e As EventArgs)
fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
fb.ShowNewFolderButton = False
Dim r As DialogResult = fb.ShowDialog
If r = Windows.Forms.DialogResult.OK Then
tb1.Text = fb.SelectedPath
If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
If tb3.Text = Nothing Then
redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
If tb3.Text = Nothing Then GoTo redo
End If
b3.Visible = True
Else
b3.Visible = False
End If
End If
End Sub
Private Sub b2_Click(sender As Object, e As EventArgs)
fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
fb.ShowNewFolderButton = True
Dim r As DialogResult = fb.ShowDialog
If r = Windows.Forms.DialogResult.OK Then
tb2.Text = fb.SelectedPath
If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
If tb3.Text = Nothing Then
redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
If tb3.Text = Nothing Then GoTo redo
End If
b3.Visible = True
Else
b3.Visible = False
End If
End If
End Sub
Private Sub b3_Click(sender As Object, e As EventArgs)
b3.Visible = False
b4.Visible = True
If Not tb3.Text.StartsWith(".") Then tb3.Text = "." & tb3.Text
bgw.RunWorkerAsync()
End Sub
Private Sub b4_Click(sender As Object, e As EventArgs)
bgw.CancelAsync()
End Sub
Private Sub ReadPWFile(fn As String)
Dim filename As String = My.Computer.FileSystem.GetName(fn)
Dim barename As String = IO.Path.GetFileNameWithoutExtension(fn)
Dim copyto As String = tb2.Text & "\" & filename
Dim line As String = Nothing
Dim lines As New List(Of String)
Using sr As IO.StreamReader = New IO.StreamReader(fn)
Do
line = sr.ReadLine()
If Not line = Nothing Then
lines.Add(barename & "," & line)
End If
Loop Until line = Nothing
End Using
Using sw As IO.StreamWriter = New IO.StreamWriter(copyto)
For Each s As String In lines
sw.WriteLine(s)
Next
End Using
End Sub
Private Sub bgw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
Dim ftc As Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(tb1.Text)
For Each f As String In ftc
If bgw.CancellationPending Then
e.Cancel = True
Exit For
End If
Dim ex As String = My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower
If My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower = tb3.Text.ToLower Then
ReadPWFile(f)
End If
Next
End Sub
Public Sub bgw_Completed(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
tb1.Text = Nothing
tb2.Text = Nothing
b3.Visible = False
b4.Visible = False
MessageBox.Show("Finished copying files", "Job Completed")
End Sub
End Class
Regards Les, Livingston, Scotland
Maybe you are looking for
-
I am seeking help in trying to save a purchased movie, in order to download another, I am not sure how to save the purchased one in order to not have to re purchase it again, where do I save it to?
-
Premiere Elements 12 opens for admin users but not general users.
Error: Premiere Elements has encountered an error....Src\Core\Preferences.cpp-347 Windows 7 box. Any suggestions? Users have rights to all Adobe folders...
-
Keyboard and Touch-Pad Not Working After Having to Install New Hard Drive
I had to install a new hard drive in my HP Pavillion DV9700t that has Vista Home Premium 64-bit. After going through the recovery process with backup disk the built in keyboard and touch-pad do not work. During the installation, an error message ca
-
Output jframe information to command window
Hi all I have a program that tracks the assets of a customer, kind of like a cart that holds cds, appliances, etc... I wanted to be able to print out the results to the command window after they enter the number of how many items from what the user e
-
Display problem in the portal: Interesting!
Hi, I am facing an interesting problem in my portal. In the content area, when an iview is getting displayed, sometimes I dont find the blue background and proper arrangements of the tabs present in the iview.It becomes plane white and the texts and