How to add a nice graphic box to code??
How do you add a nice graphic box to code? i wanted to add a little back ground colour and title with a white box for imput like
http://img211.imageshack.us/img211/4563/examplejb4.jpg
here is my code so you see what im doing it with
//logtest.java
import java.util.*;
import java.io.*;
public class logtest
public static void main(String[] args)
FileOutputStream out;
PrintStream p = null;
boolean quit = false;
String fileName = "", fileLine = "", date = "", classes = "";
Scanner file = null;
Scanner s = new Scanner(System.in);
double exitword, sample;
System.out.print ("Enter the date: ");
date = s.nextLine();
while (!quit)
System.out.print ("Enter a filename: ");
fileName = s.nextLine();
if (fileName.equals("quit"))
System.exit(0);
else
try
out = new FileOutputStream(fileName, true);
p = new PrintStream( out );
catch (Exception e)
System.out.println ("Error writing to file");
System.exit(-1);
System.out.print ("What classes are you doing? : ");
classes = s.nextLine();
p.print( date + " ");
p.print(classes + " ");
p.println ( "" );
p.close();
}thanks
Edited by: kingryanj on Feb 23, 2008 11:36 AM
i have examples of that but i cant brake it up
// Fahrenheit.java Author: Lewis/Loftus
// Demonstrates the use of text fields.
import javax.swing.JFrame;
public class Fahrenheit
// Creates and displays the temperature converter GUI.
public static void main (String[] args)
JFrame frame = new JFrame ("Fahrenheit");
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
FahrenheitPanel panel = new FahrenheitPanel();
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
}the panel part
// FahrenheitPanel.java Author: Lewis/Loftus
// Demonstrates the use of text fields.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FahrenheitPanel extends JPanel
private JLabel inputLabel, outputLabel, resultLabel;
private JTextField fahrenheit;
// Constructor: Sets up the main GUI components.
public FahrenheitPanel()
inputLabel = new JLabel ("Enter Fahrenheit temperature:");
outputLabel = new JLabel ("Temperature in Celsius: ");
resultLabel = new JLabel ("---");
fahrenheit = new JTextField (5);
fahrenheit.addActionListener (new TempListener());
add (inputLabel);
add (fahrenheit);
add (outputLabel);
add (resultLabel);
setPreferredSize (new Dimension(300, 75));
setBackground (Color.yellow);
// Represents an action listener for the temperature input field.
private class TempListener implements ActionListener
// Performs the conversion when the enter key is pressed in
// the text field.
public void actionPerformed (ActionEvent event)
int fahrenheitTemp, celsiusTemp;
String text = fahrenheit.getText();
fahrenheitTemp = Integer.parseInt (text);
celsiusTemp = (fahrenheitTemp-32) * 5/9;
resultLabel.setText (Integer.toString (celsiusTemp));
}
Similar Messages
-
How to add "Search this site" box to subsites
Hello!
We have SP 2013 Enterprise installed.
There is a search box on the main site. How to add the same search box to subsites also (with possibility to search on the subsite)?
Thanks!Hi ,
please add search webpart and configure the same
http://msdn.microsoft.com/en-us/library/dd452356.aspx
http://msdn.microsoft.com/en-us/library/office/ff512796(v=office.14).aspx
http://social.technet.microsoft.com/Forums/sharepoint/en-US/a967edda-fe7f-429a-97fb-da6405072ea5/search-on-a-subsite-webpart?forum=sharepointgeneralprevious
Please remember to click 'Mark as Answer' on the answer if it helps you -
RE: how to add attributes in graphical modulator in segment builder .
Hi Gurus,
can you please help me how to add attributes in graphical modulator in segment builder in sap CRM 7.0 WEB-UI.
thanks and regards
satyanarayana
Edited by: koradasatya on Oct 27, 2011 8:14 PMHi Gurus,
thanks for your reply my requirement from client is given below if you could answer this it will be a great help for me.
WKSC needs to be able to make selections (in segment builder) with the possibilities to use stored data on organizations. The information we are missing in Segment builder (SB) (and Account search for industrycode) are Industrycode (we want to see values not codes) and responsible salesrep (values not codes).
These variables together with regions and other marketing attributes is crucial for us. Without it we cannot use the functionality built.
We also need it so that we can extract smaller parts of our customers and prospects and update them with information from the thirdparty or adding new persons to them.
Everyone using the SB should be able to use the fields for selections. i.e. Marketers, marketing managers and power users.
Example
We would like to make selections that could look like this.
Region: A and B
Organization in Industrycode C
Sales rep: D, E, and F
Turnover: above 50000
CP on selected orgs
CP has title G or H
CP has Email not blank
thanks and regards
satya -
How to add the business transaction to t-code : CIC0 in win client
Dear sir,
We use CRM 5.0 . We would like to add business activity tranaction into t-code : CIC0. But I don't know how to do. Please kindlyadvise how to add the business transaction to t-code : CIC0 in win client.
Thank u and best regards,
VimolHello,
For each transaction type (e.g. Sales Order, Business Activity, opportunity, ....) you can maintain in which channel (IC WebClient, IC WinClient, SAPGUI, PCUI, ...) they are allow to be used. Probably the transaction types you want to see in the IC WinClient (= CIC0) are not enabled for this channel, that's why they don't appear in the WinClient (CIC0).
How to do this?
SPRO>CRM>Transaction>Basic Settings>Define transaction types
Here, look for the transaction types you want to enable in WinClient. Select the transactiont type and select "Channels" from the left pane. Here, add the channel "IC WinClient" (or something like that, I don't know the exact name anymore, in newer versions this no longer exists).
Save and restart the CIC0, after this the transaction type should be enabled.
Hope this helps,
Joost -
How to add invitees to an event through code?
How to add invitees to an event through code? Attendees property in EKCalendarItem is readonly, is there any way to do it?
Sorry by email only iCloud: Share a calendar with others
-
How to add an out-of-box JMS modules?
Hi,
I am using WebLogic Server 10.3. For my project, I need to add some out-of-box JMS modules so that there is no need to ask the administrators to create and configure them. I wonder how I can achieve this. Is it good enough just to make changes on the config/config.xml and add a corresponding *-jms.xml?
Thank you,
YangHere's a more sophisticated version of the script Kats supplied. It is a bit more flexible, and works around issues that can arise if too many changes are attempted within the same edit session.
# Sample WLST code for creating a simple WebLogic JMS
# configuration using WLST.
# This script sets up two JMS servers on the same
# WebLogic server, each with a queue and a topic.
import sys
from java.lang import System
# A method for finding an mbean.
# It uses "cd()" rather than getMBean() as "cd()" works in more cases.
def findMBean(path):
savePWD=pwd()
try:
cd(path)
value=cmo
cd(savePWD)
return value
except:
print ' --- Please ignore the previous *No stack trace available.* message.'
cd(savePWD)
return None
# A method for creating a JMS server.
def findOrCreateJMSServer(serverMBean, jmsServerName):
jmsServerMBean = findMBean('JMSServers/'+jmsServerName)
if jmsServerMBean is not None:
print ' --- JMS Server '+jmsServerName+' already exists.'
return jmsServerMBean
startEdit()
jmsServerMBean = create(jmsServerName,'JMSServer')
jmsServerMBean.addTarget(serverMBean)
save()
activate(block="true")
print ' --- JMS Server '+jmsServerName+' created.'
return jmsServerMBean
# A method for creating a JMS module for hosting JMS config,
# also creates a subdeployment named 'TheOne' for the JMS server.
# The module target is set to be the same target that's used
# for the passed in JMS server.
def findOrCreateJMSModule(jmsServerMBean, moduleName):
jmsResource = findMBean('JMSSystemResources/'+moduleName)
if jmsResource is not None:
print ' --- Module '+moduleName+' already exists.'
return jmsResource
startEdit()
jmsResource = create(moduleName,'JMSSystemResource')
jmsResource.addTarget(jmsServerMBean.getTarget())
subD = jmsResource.createSubDeployment('TheOne')
subD.addTarget(jmsServerMBean)
save()
activate(block="true")
print ' --- Module '+moduleName+' created.'
return jmsResource
# A method for creating a JMS destination. Pass 'Queue' or 'Topic'
# for destType. This method assumes subdeployment named 'TheOne'.
def findOrCreateJMSDest(destType, jmsModule, destName, destJNDIName):
# see if dest already exists
moduleName=jmsModule.getName()
longname='JMSSystemResources/'+moduleName+'/JMSResource/'+moduleName
if (destType == 'Queue'):
longname+='/Queues/'+destName
elif (destType == 'Topic'):
longname+='/Topics/'+destName
else:
raise Exception('Unknown dest type '+destType)
jmsDest = findMBean(longname)
if jmsDest is not None:
print ' --- Destination '+destName+' already exists.'
return jmsDest
# dest does not exist, create it
startEdit()
if (destType == 'Queue'):
jmsDest = jmsModule.getJMSResource().createQueue(destName)
else:
jmsDest = jmsModule.getJMSResource().createTopic(destName)
jmsDest.setJNDIName(destJNDIName)
jmsDest.setSubDeploymentName('TheOne')
save()
activate(block="true")
print ' --- Destination '+destName+' created.'
return jmsDest
# Connect to a WebLogic Admin Server. When username, password
# and URL are not passed as arguments, connect will prompt
# for these values.
#connect('system','mypassword','t3://mymachine:7001')
connect()
edit() # Navigate to the root of the config MBean tree.
print ' --- Enter the name of the WLS server that will host the JMS servers.'
print ' --- Choices: ---'
ls('Servers')
print ' ----------------'
print ' --- --> ',
wlServerName=sys.stdin.readline().strip()
svMBean=findMBean("Servers/"+wlServerName)
if svMBean is None:
print ' --- WebLogic server '+wlServerName+' not found.'
stopExecution(' --- Cannot find the WebLogic myserver '+wlServerName)
try:
jmsServerMBean = findOrCreateJMSServer(svMBean, 'MyJMSServer')
jmsModule = findOrCreateJMSModule(jmsServerMBean, 'MyJMSModule')
findOrCreateJMSDest('Queue', jmsModule, 'MyQueue', 'MyQueue')
findOrCreateJMSDest('Topic', jmsModule, 'MyTopic', 'MyTopic')
print ' --- Configuration complete.'
except:
dumpStack()
print ' --- Error, admin server log may contain details!!!'
stopEdit('y') -
How to add an image/graphic to a form webpage?
Dear All,
When we execute our Oracle Forms application, it opens in a webpage with a white background. This looks too bland.
Is there a way we can add an image/graphic to the webpage to improve its look and feel? Please suggest.
Thanks,
AmitHello,
You have two tags in the /forms/server/formsweb.cfg file to put images in the background:
splashScreen=no
background=noreplace the NO value by a .GIF or JPG existing file name on the server.
You can also hide the blank page (when separate frame=yes) as soon as it dosplays with the following in your concerned section:
HTMLbodyAttrs=onLoad='javascript:self.moveTo(2000,2000)'Francois -
How to add record in List Box in Screen Painter(SE51) ?
I am not able to add record in List box in Screen Painter using se51 Transaction code.
Regards,
Nirav DesaiDear All,
I found the solution.
If you are facing same problem , follow the bellow steps.
1. Declare in report.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
2. IN PBO Event.
clear: list.
NAME = 'TXT_PERIOD'. " your screen field name
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
VALUE-KEY = '3'.
VALUE-TEXT = 'LINE 3'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING ID = NAME VALUES = LIST.
Regards,
Nirav Desai -
How to add an audio click box on a quiz slide - adobe captivate 6?
Hi,
I'm trying to add an audio click box on a question slide. It works brilliantly on normal slides but theres no option to add a click box on quiz slides.
I'm trying to add audio on click. So, when somebody clicks that area they will hear a sound. Is there a way to do this on a question slide?
ThanksReplace those old click boxes by shapes configured as buttons. Have a look at this post:
http://lilybiri.posterous.com/want-a-button-on-question-slide-in-captivate
Lilybiri -
How to add a new column as T-Code in PFCG
Hi
I want to remove some existed Tcodes from role via PFCG. But there are just one column as T-Code description. That's very trouble for finding out T-code. I also try to add column as T-code. But I cann't find out it.
Everybody can tell me how to add it?
Regards
Henryhi,
go to Tcode PFCG ->menu
in that you will find Role menu . in that you will be having all your Tcode nodes .
just right click on the node which you want to delete and select delete node -
How to add one column into the t.code: cat2
Hi
I am userexits
here i want to add one column into the t.code: cat2 at particular location, and that added field have to display the data what i am selcting in that transaction.
how to do this...
thankxhi,
CATS0005
CATS0007
CATS0009
CATS0010
CATS0012.
Go through the documentations of above Enhancements to solve ur problem. I am not able to understand ur exact requirement. that is y i gave some more Enhancements. -
How do I move a graphic-box in a document I imported from AppleWorks?
I imported a book which I wrote in AppleWorks without problems into Pages '08. On one page of this book I had created a box, using the graphics tool, and moved it to the back so I could read the text inside it. It is now in the Pages '08 version of my book, but because of editing and additional writing which I've done, it appears on page 295, not 297 where it belongs. In AppleWorks I could simply select it and drag it into place. In Pages '08 I can't figure out how to select it. It's just there.
Help desperately needed.Here is an AppleScript which, in a single call will
• extract the embedded picture files
• strip the annoying description of the 'background' pictures from the Index.xml file.
So, we may open the Pages document, it will be free of the oddity and the picture files are available in the folder "importés_sétropmi" on the desktop.
--(SCRIPT recupPictures]
Save the script as an Application (Bundle Application if you want to use it on a MacIntel)
Store it on the Desktop.
Drag and drop the icon of a Pages document imported from AppleWorks on the script's icon.
The script will move the embedded picture files in a folder named "importés_sétropmi" on the desktop.
Then it will strip the Index.xml file from the block of datas describing the embedded pictures.
Yvan KOENIG (FRANCE 7 juillet 2008)
property typePages : "com.apple.iwork.pages.pages"
property baliseDebut : "<sl:drawables>"
property baliseFin : "</sl:drawables>"
property return2 : return & return
property line_Feed : ASCII character 10
property line_Feed2 : line_Feed & line_Feed
property monDossier : "importés_sétropmi"
property withSeconds : true
--=========
on run (*
lignes exécutées si on double clique sur l'icône du script application
• lines executed if one double click the application script's icon *)
tell application "System Events" to set docIwork to (choose file of type typePages)
my commun(docIwork) (* un alias *)
end run
--=========
on open (sel) (*
sel contient une liste d'alias des élémentsqu'on a déposés sur l'icône du script (la sélection)
• sel contains a list of aliases of the items dropped on the script's icon (the selection) *)
set item1 to item 1 of sel
tell application "System Events" to set typeID to (type identifier of item1) as Unicode text
if typeID is not typePages then return
my commun(item1) (* un alias *)
end open
--=========
on commun(thePack)
local typeID, p2d, p2dd, liste, path2Index, texteXML, lafin
set p2d to path to desktop as Unicode text
set p2dd to p2d & monDossier & ":"
tell application "Finder"
set liste to files of thePack whose name starts with "file"
if liste is {} then return (* no picture file so nothing to do *)
if exists folder p2dd then set name of folder p2dd to (monDossier & my horoDateur(modification date of (item p2dd)))
make new folder at folder p2d with properties {name:monDossier}
repeat with f in liste
move f as alias to folder p2dd
end repeat
end tell -- to Finder
try
set path2Index to (thePack as Unicode text) & "Index.xml"
set texteXML to my lis_Index(path2Index)
if texteXML contains baliseDebut then
set liste to my decoupe(texteXML, baliseDebut)
set lafin to my decoupe(item 2 of liste, baliseFin)
set texteXML to item 1 of liste & lafin
if texteXML contains return2 then
set texteXML to my recolle(my decoupe(texteXML, return2), return)
end if
if texteXML contains line_Feed2 then
set texteXML to my recolle(my decoupe(texteXML, line_Feed2), line_Feed)
end if
my enregistre(texteXML, path2Index)
end if
on error error_message number error_number
if the error_number is not -128 then my affiche(error_message)
end try
end commun
--=========
on affiche(msg)
tell application "Finder"
activate
display dialog msg buttons {"Cancel"} default button 1 ¬
giving up after 120
end tell
end affiche
--=========
on lis_Index(cheminXML0)
local cheminXML0, cheminXMLgz, txtXML
set cheminXMLgz to cheminXML0 & ".gz"
tell application "System Events"
if exists file cheminXMLgz then
if exists file cheminXML0 then delete file cheminXML0 (*
un curieux à pu dé-gzipper le fichier
• someone may have gunzipped the file *)
my expand(cheminXMLgz)
set txtXML to my lisIndex_xml(cheminXML0)
else if exists file cheminXML0 then
set txtXML to my lisIndex_xml(cheminXML0)
else
error "Index.xml missing"
end if
end tell -- to System Events
return txtXML
end lis_Index
--=========
on expand(f)
do shell script "gunzip " & quoted form of (POSIX path of (f))
end expand
--=========
on lisIndex_xml(f)
local t
try
set t to ""
set t to (read file f)
end try
return t
end lisIndex_xml
--=========
on enregistre(leTexte, nDoc)
local aliasNDoc
set aliasNDoc to nDoc as alias
write leTexte to aliasNDoc starting at 0
do shell script "gzip " & quoted form of POSIX path of aliasNDoc
end enregistre
--=========
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=========
on recolle(l, d)
local t
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to ""
return t
end recolle
(* =============
• Build a stamp from the modification date_time
on horoDateur(dt)
local annee, mois, jour, lHeure, lesSecondes, lesMinutes
set annee to year of dt
set mois to month of dt as number (* existe depuis 10.4 *)
set jour to day of dt
set lHeure to time of dt
set lesSecondes to (lHeure mod 60)
set lHeure to round (lHeure div 60)
set lesMinutes to (lHeure mod 60)
set lHeure to round (lHeure div 60)
if withSeconds is true then
return "_" & annee & text -2 thru -1 of ("00" & mois) & text -2 thru -1 of ("00" & jour) & "-" & text -2 thru -1 of ("00" & lHeure) & text -2 thru -1 of ("00" & lesMinutes) & text -2 thru -1 of ("00" & lesSecondes)
else
return "_" & annee & text -2 thru -1 of ("00" & mois) & text -2 thru -1 of ("00" & jour) & "-" & text -2 thru -1 of ("00" & lHeure) & text -2 thru -1 of ("00" & lesMinutes)
end if (*
• Here, the stamp is "_YYYYMMDD-hhmm" or "_YYYYMMDD-hhmmss" *)
end horoDateur
--=========
-- [/SCRIPT]
Yvan KOENIG (from FRANCE lundi 7 juillet 2008 20:27:47) -
How to add a single check box and a label to a image in Muse?
Hello!
I need help with adding a check box with a label to the right of it. I know about the forms, and how you can add a check box there but i don't need all the other form options.Hi
It is not possible to use only checkbox from a form at the moment. An alternate way could be inserting it using html, something like below
<input type="checkbox" name="Muse" value="Muse"> A sample checkbox<br>
I am not sure what exactly you are trying to achieve, but this will work with Form tag only, like in the example here
Tryit Editor v2.5
Do let me know if you have any question. -
How to add checkbox in dropdown box
hi to all
please help me urgent
can we add check box in to the drop down box in screen painter..?
if yes then please tell me in detail.
thank you...Hi,
In drop down ( combo box) u can select only one item at a time. so why do u need check box ? -
How to add JTables to Check Box
hi,
well instead of giving a string to the check box i want to add the JTables.
Anykind of answers will be appreciated.
Thanking you
KThis is The AWT forum, you talk about a JTable, and you want to add it to a Checkbox ???.
If you mean JCheckbox use checkbox.add(table);, JCheckbox is also a container. I hope it will look good.
Noah
Maybe you are looking for
-
Looking for a better join than a union join
What I am trying to achieve is get sum(a.ce_ord_mhr) and sum(b.ce_ord_mhr) to display in the same line which cannot be achieved with a union join. I have tried to the tables by: join PS_CE_FSC_ADJ_DTL b on (a.location = b.location) but this just gave
-
Substitution variable - Problem
The requirement is to have numeric value to a substitution variable. In essbase there is a provision to set numeric value to a substitution variable . i tried out the below one its not working. Create a sub variable and assigned value "12" and tried
-
Hi! How can I do that when the user press "enter" key click inside an input field (for example an inputText), that key press fires the action of a commandButton diferent than the fisrt i have placed in my form??? Can anybody help me? =)
-
XML Forms: save form in "Show Form" Mode
Hi All, Is there a way to have 2 edit screens in XML Forms? My scenario: 1) user creates form 2) admin reads form and changes the property "status" to "form read" (a field that the user does not see) and saves. Is this possible? I can add the contro
-
Hi: My hard drive crashed on my desk top and we replaced the computer. When I logged into itunes previously, i could see all of my purchased music in my library, now there is nothing there. When I plug in my Ipod, I can see what is on my Ipod, but i